Announcement

Collapse
No announcement yet.

Reversing Array ordering

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reversing Array ordering

    Hello, this is my first post here.

    Anyway, how would I go about changing the order of a array? What I want is to have a pulldown menu somewhere on a page with the option of asending or decending order for a group of information (the array).

    so if I have
    1
    2
    3,
    I could change it via the pulldown menu to
    3
    2
    1.

    Do you guys get it? Could you help me out? Thanks.

  • #2
    $input = array ("php", "asp", "jsp", "c++")
    $result = array_reverse ($input);



    the manual explains this pretty clearly...

    Comment


    • #3
      It did?

      Well this was a stupid question then.

      Thank you.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X