Jump to content

Change Sort Order

- - - - -

  • Please log in to reply
1 reply to this topic

#1
JambPHP2

JambPHP2

    Newbie

  • Members
  • Pip
  • 1 posts
Can anyone tell me how to adjust the following code to sort by 'title' only. I am completely new to PHP and can't get this to work.

'sort' => array( 
    'type' => 'select', 
    'options' => array( 
        'time_stamp' => Phpfox::getPhrase('music.date_added'), 
        'title' => Phpfox::getPhrase('music.name') 
    ), 
    'default' => 'time_stamp', 
    'alias' => 'm' 
), 
'sort_by' => array( 
    'type' => 'select', 
    'options' => array( 
        'DESC' => Phpfox::getPhrase('core.descending'), 
        'ASC' => Phpfox::getPhrase('core.ascending') 
    ), 
    'default' => 'DESC' 
),

Edited by Alexander, 17 February 2011 - 03:53 PM.
Code tags, # button


#2
__ak

__ak

    Newbie

  • Members
  • PipPip
  • 24 posts
I am not completely sure what you mean, but have you looked at PHP: usort - Manual ?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users