Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

how to sort

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

how to sort

Postby Divyatamizh » Thu Apr 11, 2013 4:41 am

Is there any possibility to sort this in ascending order:


2013-04-01=>NA
2013-04-04=>NA
2013-04-05=>NA
2013-04-02=>08:00:04
2013-04-03=>04:50:22
2013-04-06=>03:00:55
2013-04-07=>08:01:06
Divyatamizh
New php-forum User
New php-forum User
 
Posts: 9
Joined: Sun Mar 03, 2013 11:56 pm

Re: how to sort

Postby sandeep605085 » Thu Apr 11, 2013 5:32 am

<?php
$array = array(
'2013-04-01' => 'NA',
'2013-04-04' => 'NA',
'2013-04-05' => 'NA',
'2013-04-02' => '08:00:04',
'2013-04-03' => '04:50:22',
'2013-04-06' => '03:00:55',
'2013-04-07'=> '08:01:06'
);
asort($array);
?>
User avatar
sandeep605085
New php-forum User
New php-forum User
 
Posts: 44
Joined: Tue Feb 26, 2013 6:00 am
Location: Mindfire Solutions


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron