Array contents and keys to different arrays [resolved]
Posted: Thu Dec 03, 2009 4:24 pm
Ahoy all.
Quick and simple one, what do you think the best method for solving this is?
I have an associative array, let's call it $person, with values such as;
What would be the best way to dump the keys into a numerically indexed array, and the same with the values? resulting in $these_are_my_keys containing;
and $these_are_my_values containing;
Thanks in advance 
Quick and simple one, what do you think the best method for solving this is?
I have an associative array, let's call it $person, with values such as;
Code: Select all
"name" => "Bob"
"sex" => "male"
"weight" => 185
.
.
.
Code: Select all
0 => "name"
1 => "sex"
2 => "weight"
.
.
.
Code: Select all
0 => "Bob"
1 => "male"
2 => 185
.
.
.