Iterate through array and get key and value

illusion

New Member
I need to iterate through a dynamic array. The array will look something like the following:\[code\]Array( [2010091907] => Array ( [home] => Array ( [score] => Array ( [1] => 7 [2] => 17 [3] => 10 [4] => 7 [5] => 0 [T] => 41 ) [abbr] => ATL [to] => 2 ) [away] => Array ( [score] => Array ( [1] => 0 [2] => 7 [3] => 0 [4] => 0 [5] => 0 [T] => 7 ) [abbr] => ARZ [to] => 2 ) [weather] => [media] => Array ( [tv] => FOX [sat] => 709 [sathd] => 709 [radio] => Array ( [home] => 153 [away] => 90 ) ) [bp] => 13 [yl] => [qtr] => Final [down] => 0 [togo] => 0 [clock] => 00:26 [posteam] => ARZ [note] => [redzone] => [stadium] => Georgia Dome )\[/code\]I need it to be dynamic and for testing purposes, I need to be able to call it via:\[code\]echo "Key: $key; Value: $value<br />\n";\[/code\]I'm going to later take this information and place it into a mysql database, but for now, I need to brush up on arrays and figure out how to format the data. Any help is appreciated.
 
Back
Top