#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Nobbies beach, Gold Coast. It's beautiful.
    Posts
    2,585
    Rep Power
    171

    Array-multisort is only for same size arrays


    Hi

    Getting into php.net. It has it's own style.

    Why doesn't the manual say You can only use array_multisort if the arrays you are multi-sorting have the same number of elements other wise you will get a big fat warning.

    Or did I miss it?
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,906
    Rep Power
    3969
    I would gather it does not mention such a thing because the nature of the what the function does implies that the arrays need to be identically sized.

    If you're so inclined, you can submit a change proposal to the manual at https://edit.php.net/
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,698
    Rep Power
    6351
    zxcvbnm, array_multisort is for sorting parallel arrays, not for independently sorting multiple arrays. Don't use it for what you're trying to use it. Just use sort() twice.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  6. #4
  7. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Nobbies beach, Gold Coast. It's beautiful.
    Posts
    2,585
    Rep Power
    171
    You 2 always answer array questions.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo