print_r($myarr); I get following output; Array ( [0] => Array ( [rid] => 4 [cid] => 2 [due_date] => 2011-03-31 [arrival_city] => [arrival_state]) I can access rid using this syntax $myvar = $myarr[0][rid]; Can I format this array, where i can access array values like this $myvar = $myarr[rid]; Possible?
This is an array within array. If you do this, then u can access the element right away. $myNewArr= $myarr[0]; $myvar = $myNewArr[rid];
If you don't need the original array then you can use this: $myarr = $myarr[0]; $myvar = $myarr[rid];