js .sort based on a field code example
Example: sort array by field
function cmp($a, $b)
{
return strcmp($a["title"], $b["title"]);
}
usort($array, "cmp");
function cmp($a, $b)
{
return strcmp($a["title"], $b["title"]);
}
usort($array, "cmp");