[ create a new paste ] login | about

Link: http://codepad.org/UoY8oaKY    [ raw code | output | fork ]

PHP, pasted on Sep 21:
<?php

$arr = array('2010091907' => array('home' => Array ('score' => Array ( '1' => 7,
                                                                       '2' => 17,
                                                                       '3' => 10,
                                                                       '4' => 7,
                                                                       '5' => 0,
                                                                       'T' => 41,
                                                                    ),

                                                    'abbr' => 'ATL',
                                                    'to' => 2
                                                  )),
             '2010091908' => array('home1' => Array ('score' => Array ( '1' => 7,
                                                                       '2' => 17,
                                                                       '3' => 10,
                                                                       '4' => 7,
                                                                       '5' => 0,
                                                                       'T' => 41,
                                                                    ),

                                                    'abbr' => 'ATL1',
                                                    'to' => 2
                                                  )));



foreach ($arr as $key => $date) {
	echo "Key: ".$key."; Value: ".$date . " ";
         foreach ($date as $team) {
             echo "Team: ".$team['abbr'] . " | ";
         }    
}


?>


Output:
1
Key: 2010091907; Value: Array Team: ATL | Key: 2010091908; Value: Array Team: ATL1 | 


Create a new paste based on this one


Comments: