jadebox

msg:4521358 | 1:16 am on Nov 22, 2012 (gmt 0) |
I don't see anything wrong in the function. Can you post the code you used to call the function and display the result? Is it possible that you accidently used "print($result_array)" instead of "print_r($result_array)" when checking the return from the function? -- Roger
|
Habtom

msg:4521387 | 2:45 am on Nov 22, 2012 (gmt 0) |
What exactly returns "Array". If you do the following, what result do you get? $newArr = diary_vehicle_select(); print_r($newArr);
|
LinusIT

msg:4521506 | 9:36 am on Nov 22, 2012 (gmt 0) |
I was using echo diary_vehicle_select(); which gave me the result Array. If I use: $newArr = diary_vehicle_select(); print_r($newArr); Then this returns the array correctly, thank you.
|
ericlewis107

msg:4525858 | 11:25 am on Dec 7, 2012 (gmt 0) |
array_values($arr) function accepts a PHP array and returns a new array containing only its values (not its keys). Its counterpart is the array_keys() function. Use this function to retrieve all the values from an associative array. Code: $data = array("hero" => "Holmes", "villain" => "Moriarty"); print_r(array_values($data)); ?> Output: Array ( [0] => Holmes [1] => Moriarty )
|
|