<?php$a = array(array('idC','usernameC'), array('idA','usernameA'), array('idB','usernameB'));$id = array();foreach ($a as $key => $row){ $id[$key] = $row[0];}array_multisort($id, SORT_ASC, $a); print_r($a);
Standard input is empty
Array ( [0] => Array ( [0] => idA [1] => usernameA ) [1] => Array ( [0] => idB [1] => usernameB ) [2] => Array ( [0] => idC [1] => usernameC ) )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!