array_walk($result, create_function('$a, $b', 'return (strtolower($a->{$section . "_name"}) < strtolower($b->{$section . "_name"}));'), $section);
I thought this would sort an object array by the property {$section . "name"} (the variable $section has multiple values, hence, the object array might be "image_name", "video_name", "audio_name", "anything_name", but it will definitely exist, by whatever name comprises ${section}name, in the object property within the object that makes up each array element), however, the sorting never takes place.
How can I ensure that the object array is always sorted by $obj->{$section . "_name"}?
Thanx
Phil