karthikanov24 Posted November 7, 2009 Share Posted November 7, 2009 hi array_multisort($parent); $parent displays the following array before multisorting...as follows.. Array ( [0] => Array ( [cat_id] => 15 [cat_parent_id] => 12 [cat_name] => Mercedes-Benz [cat_image] => e40c0b24095b3b5284cb5f64ab394b5a.jpg [cat_description] => Expensive but real good ) [1] => Array ( [cat_id] => 14 [cat_parent_id] => 12 [cat_name] => Volvo [cat_image] => 45ad4ebcdc58193534aabc6dc9c1a022.jpg [cat_description] => Swedish luxury car ) ) After using array_multisort() as shown in the code it displays as follows... Array ( [0] => Array ( [cat_id] => 14 [cat_parent_id] => 12 [cat_name] => Volvo [cat_image] => 45ad4ebcdc58193534aabc6dc9c1a022.jpg [cat_description] => Swedish luxury car ) [1] => Array ( [cat_id] => 15 [cat_parent_id] => 12 [cat_name] => Mercedes-Benz [cat_image] => e40c0b24095b3b5284cb5f64ab394b5a.jpg [cat_description] => Expensive but real good ) ) what has been changed here after using array_multisort() in the above array...? (how it is sorted..?) thanks karthikanov24 Link to comment https://forums.phpfreaks.com/topic/180652-multisort/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.