Let’s say you had an array as following :
$time = array ("0600", "0000", "1200", "1800");
but you wanted it to be shown as
- 0000
- 0600
- 1200
- 1800
Use asort ..
asort ($time);
But you might also want to reverse order it.
Which is to show the latest possible date and time ..
arsort ($date_time_list);
Reference :
http://www.php.net/manual/en/.asort.php
http://www.php.net/manual/en/.arsort.php
Leave a Comment