Question : PHP Array: Only the first item in array is returned

There are five items in this array:
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>

But only the first item is returned.  How can I get all five items?
1:
2:
3:
4:
5:
6:
7:
8:
<?php
header('Content-Type: text/plain; charset=UTF-8');
$xml = file_get_contents('http://pastehtml.com/view/19qgkgx.txt');
$s = simplexml_load_string($xml);

// This only displays the first of five items!
print_r($s->ResultSet->Matchup->Trends->Team[0]->TeamTrends->Trend);
?>

Answer : PHP Array: Only the first item in array is returned

It's an array. Iterate through it with FOREACH
1:
2:
3:
4:
5:
6:
7:
8:
9:
<?php
header('Content-Type: text/plain; charset=UTF-8');
$xml = file_get_contents('http://pastehtml.com/view/19qgkgx.txt');
$s = simplexml_load_string($xml);


foreach ( $s->ResultSet->Matchup->Trends->Team[0]->TeamTrends->Trend as $anItem )
     echo "'$anItem'<br/>";
?>
Random Solutions  
 
programming4us programming4us