$data[$i][content] - html
$data[$i][duedate] - unix timestamp
I simply want to sort the $data by the duedate timestamp ascending. I cannot for the life of me figure out how to do this so that when I print $data, the content is organized by the duedate.
like josh said above it really depends where you are getting your data from and what you plan to do with it but a possibility could be to use your timestamp as an array index
eg
$data[duedate][content]
$data[duedate][more content]
$data[duedate][even more content]
and then use one of the array sort functions to order the array by the timestamp…
again you would need to show a bit more of your code to be clear of what you actually trying to achieve
Basically I have data coming forms several databases stored in variables. I’m definitely not up on my SQL game to figure it all out, so I have data stored in arrays. It’s just for me though, so it works fine.