title: Adjusting Php-xml code to just pull three elements, not all
body: <p><strong>UPDATED CODE</strong></p>
  
  <pre><code>try{
      function processLink( $link , $appendArr ){
      ## gets url from database as outlined above.
          $xmlUrl = $link;
          #Loads the url above into XML    
          $ConvertToXml = simplexml_load_file($xmlUrl);
          # -&gt; Setup XML
          $appendArr[] = $ConvertToXml-&gt;channel-&gt;item;
      }
      #Connect to DB
      require_once '../../src/conn/dbc.php';
      $dbconn = new PDO('mysql:host=localhost;port=3306;dbname=thedb',$db_user,$db_pass,array(PDO::ATTR_PERSISTENT =&gt; true));
      $q = $dbconn-&gt;prepare("SELECT FW_ArtSrcLink FROM FW_ArtSrc WHERE OneSet=:OneSet and leagID = :TheLeagueID");
      $q-&gt;execute(array(':OneSet' =&gt; 1, ':TheLeagueID' =&gt; 14));    # SET LEAGUE HERE.
      $result = $q-&gt;fetchAll();
      $newsStory = array();
          $title = $newsStory-&gt;title;
          $link  = $newsStory-&gt;link;
      foreach ($result as $value ){
              if ( is_array($value) ){
                  foreach ( $value as $secondValue ){
                      processLink($secondValue , &amp;$newsStory);
                  }
  
                  continue;
          }
  
          processLink($value , $newsStory);
  
      }                  
      //print_r($newsStory);
  
          echo 'TITLE: '.$title;
          echo 'LINK'.$link;
  }
  </code></pre>
  
  <p><strong>How do I modify my code to ONLY grab the <code>[title]</code> and <code>[link]</code> ?</strong> - which means its not outputting anything::</p>
  
  <p>It currently outputs:
  <img src="https://i.stack.imgur.com/Pq4pN.png" alt="img1"></p>