working on test.php function (sorting multidimensional arrays)