• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP help

zimu

Diamond Member
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
 
Back
Top