Avatar of Matthew Roessner
Matthew Roessner

asked on 

PHP - Sort Multi-Dimensional Array

I have the following array, that I create within a "while loop":



I want to sort the $drugs array based on the "dcv" portion of the array.  I plan to output the array using a "for loop" - and want to have the output which I am using for a report - to list everything starting with the smallest DCV to the largest DCV.

I was looking at trying to use USORT() - but wasn't sure if that was the right direction or not.

Any help would be very much appreciated.


Avatar of undefined
Last Comment
Matthew Roessner

8/22/2022 - Mon