[php]
echo “
”;”;
foreach ($standings[“Pacific”][“delta”] as $value1) {
foreach ($standings[“Pacific”][“delta”][$value1] as $value2) {
echo $value2." ";
}
echo “
”;
}
echo “
[/php]
Whats wrong with this code? , like this:
[php]
The array structure is as follows:
(Using Pacific conference, Delta division, 001 team ID and Team_Name as examples)
$standings => Array
(
[Pacific] => Array
(
[delta] => Array
(
[001] => Array
(
[NAME] => Team_Name
[POINTS] => 1
[PF] => 1
[WINS] => 1
[LOSES] => 1
[TIES] => 1
[PCT] => 1.00
[ID] => 1-1
[OD] => 1-1
)
)
)
)
The first level of the array is the Conference.
Possible values: [Pacific, Central, Atlantic]
The second level of the array is the Division.
Possible values: [Delta, Omega, Theta, Gamme, Unasigned]
The third level of the array is the Team or Member Info (depending on Division)
#============================================================================================
[/php]
You can find all the php codeand XML file that the data is parsed from here:
http://www.caleague.com/standings_xml_parse.phps
http://www.caleague.com/data/div_cso/standings.xml
How would I get the data out of the array to display an HTML table like this:
Conference: Pacific |
---|
Division: Delta |
-------------------------------- |
Team Wins Losses etc… |
-------------------------------- |
Team1 1 0 … |
Team 2 0 1 … |
_______________________ |