Link to home
Start Free TrialLog in
Avatar of smoothcat11
smoothcat11

asked on

PHP Multisort Function

How would I sort this array if I wanted the records with the YEAR_BUILT Sorted Numerically

I would basically like the same sort function as ORDER BY in SQL

Eg:

$property[DETAILS][0][YEAR_BUILT]
$property[DETAILS][0][VALUE]
$property[DETAILS][1][YEAR_BUILT]
$property[DETAILS][1][VALUE]
$property[DETAILS][2][YEAR_BUILT]
$property[DETAILS][2][VALUE]

Is there a way to do this:

array_multisort($property[DETAILS][???][YEAR_BUILT],SORT_NUMERIC,$property);

Notice where the question marks are... Thanks for your time.
ASKER CERTIFIED SOLUTION
Avatar of steelseth12
steelseth12
Flag of Cyprus image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Its not that i dont appreciate  the points and the grade. But you should have this question delete as the answer was given in the previous question Q_22902204.html.

You can ask for this question to be deleted in the community support

 https://www.experts-exchange.com/Community_Support/General/