Tuesday, July 26, 2011

Re: [phpXperts] Sort Array by key

 

Follow the link of php documentation for sorting arrays.

On Tue, Jul 26, 2011 at 12:35 PM, rafiq sohel <rafiq7s@yahoo.com> wrote:
 

Hello,

I have an array like following. I want to sort it (ascending or descending order) according to 'time'. Please suggest me to find an optimal solution.

$myArray = array(
    0 => array(
        'door' =>'IT',
        'time' =>'09:00:00'
    ),
    1 => array(
        'door' =>'HR',
        'time' =>'09:57:00'
    ),
    2 => array(
        'door' =>'Fin',
        'time' =>'09:24:00'
    ),
    3 => array(
        'door' =>'IT',
        'time' =>'10:00:00'
    )
);
 
Regards,

Md. Rafiqul Islam (Shohel)
GMG Airlines Ltd.
Cell: +880 1911745532




--
:: Md.Shoriful Islam Ronju ::
http://blog.smronju.com

__._,_.___
Recent Activity:
Visit phpXperts website at www.phpxperts.net
.

__,_._,___

No comments:

Post a Comment