This is my array. There will all ways be the same number of elements (9) in each row, however the number of rows, currently at 6, may increase.
Array ( [0] => Array ( [] => US [1] => U.S. [2] => 21 [3] => 34 [4] => 33 [5] => 35 [6] => 39 [7] => 50 [8] => 61 ) [1] => Array ( [] => 79 [1] => 45 [2] => 84 [3] => 89 [4] => 59 [5] => 64 [6] => 34 [7] => 58 [8] => 55 ) [2] => Array ( [] => 63 [1] => 105 [2] => 68 [3] => 62 [4] => 64 [5] => 67 [6] => CL [7] => Chile [8] => 56 ) [3] => Array ( [] => 40 [1] => 40 [2] => 63 [3] => 37 [4] => 57 [5] => 64 [6] => 59 [7] => 53 [8] => 68 ) [4] => Array ( [] => 70 [1] => 66 [2] => 88 [3] => 48 [4] => 76 [5] => 83 [6] => 80 [7] => 53 [8] => 45 ) [5] => Array ( [] => 44 [1] => 51 [2] => 52 [3] => [4] => [5] => [6] => [7] => [8] => ) ) I need to get the 1st item in each so for the 1st one i need (US) I'm stuck as if i put
echo $array[0][1]; Then I get U.S. however i need the first item (US) so i tried both
echo $array[0][0]; echo $array[0][]; Neither return a value. What am i doing wrong?
$foo['']echo $array[0][''];. It's bad data structure design in my opinion...echo reset($array). If you need the key,reset($array);thenkey($array);current)