Reserved word in XML parsing?

mrjon

New Member
I have the following:\[code\]<?php#Load in File$xmlUrl ="http://sports.espn.go.com/espn/rss/mlb/news";$ConvertToXml = simplexml_load_file($xmlUrl);# -> Setup XML$newsStory = $ConvertToXml->channel;# -----> Load News Storiesfor($i = 0;$i<sizeof($newsStory); $i++){ // Source of Article Info--> $SrcTitle=$newsStory[$i]->title; $SrcLink=$newsStory[$i]->link; // Actual News Article Info --> $title=$newsStory[$i]->item->title; $desc=$newsStory[$i]->item->description; echo '<hr>'; echo '<strong>'.'Title:'.$title.'</strong>'.'(via: <a href=http://stackoverflow.com/''.$SrcLink.'\'>'.$SrcTitle.'</a>'.'<br />'; //echo 'Link:'.$link.'<br />'; echo 'Description'.$desc.'<br>'; echo '<hr>';}\[/code\]It outputs just 1 result when it should output about 10 results...This line: \[code\]$SrcLink=$newsStory[$i]->link;\[/code\] the "link" word appears to possibly be a 'reserved' word here since its purple on my editor as shown in the image below:
fqGq8.png
What am I doing wrong here?
 
Back
Top