![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2007
Posts: 106
OS: window XP
|
Sorting date in php array
There are php sort() function to sort array. But the problem that i face is how to sort the two-dimensional array and sort the date in desending order? the array is as below
Code:
$data = array(); $data[0][0] = "2008-05-23"; $data[0][1] = "data 1"; $data[1][0] = "2008-05-15"; $data[1][1] = "data 2"; $data[2][0] = "2008-06-06"; $data[2][1] = "data 3"; $data[3][0] = "2008-05-08"; $data[3][1] = "data 4"; |
|
|
|
|
|
#2 (permalink) |
|
Design Team Member
|
Re: Sorting date in php array
You may have to sort it manually if sorting two-dimensional arrays are not supported by the SORT feature, unfortunately.
__________________
Free Resources PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |Web Design/Programming - KompoZer (Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting | |
|
|
|
![]() |
| Thread Tools | |
|
|