I can sort single array using sort functions but what will I do for multi-dimensional array.
Enter your PHP question at the top of this page and click Get An Answer.
Tell us how quickly you want your PHP question answered.
Connect with your programmer via online chat or telephone call.
I can sort single array using sort functions but what will I do for multi-dimensional array.
There is a built-in function called array_multisort.
Here is an example of this function:
<?php
$multiarray = array(array(5,4,3,2,1),array(7,8,2,9,10));
array_multisort($multiarray[0],SORT_ASC);
print_r($multiarray);
?>
wow, thanks
Byron Narciso
Programmer
Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.
ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!