Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php order array by specific key

    function cmp($a, $b)
    {
        return strcmp($a->display_name, $b->display_name);
    }

    usort($blogusers, "cmp");

    foreach ($blogusers as $bloguser)
    {
        ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #order #array #specific #key
ADD COMMENT
Topic
Name
3+5 =