Here's another question for PHP people!
Lets say i've got an associative array, for which the value is an array.
so
apples=>red, green, orange
bananas=>yellow, green
etc.
The name of the entire array is "fruits"
now, how can i alphabetize the red, green, orange etc?
i was thinking it would be as easy as
foreach($fruits as $fruits=>$colors){
$fruits[$fruit]=asort($colors);
}
Why won't this work? it somehow gives a blank value into each value then!! i WANT to overwrite the old array with the new, aphabetized version!
Thanks
Lets say i've got an associative array, for which the value is an array.
so
apples=>red, green, orange
bananas=>yellow, green
etc.
The name of the entire array is "fruits"
now, how can i alphabetize the red, green, orange etc?
i was thinking it would be as easy as
foreach($fruits as $fruits=>$colors){
$fruits[$fruit]=asort($colors);
}
Why won't this work? it somehow gives a blank value into each value then!! i WANT to overwrite the old array with the new, aphabetized version!
Thanks