Hey, how do I sort the contents of an array in php alphabetically, while ignoring other characters like " and <.
Hey, how do I sort the contents of an array in php alphabetically, while ignoring other characters like " and <.
PHP Code:<? sort($array) ?>
Last edited by Christopher; 05-22-2008 at 01:39 PM.
Use some code like this.
The optional second thing that you are passing to the sort() function means that will sort them numerically, which for some odd reason seems to ignore symbols. ;)PHP Code:sort($array, SORT_NUMERIC);
~LHVWB, Formerly known as Verbsite.
Getting Started | Forum Rules | X10 Commandments
Terms of Service | Getting Support | IRC Support Chat
Using Simple Machines Forums? Check out my SMF Mods..