i have an array of objects like this : http://pastebin.ca/3217309
i want to sort this array to objects with come first then others sort by date
currently I'm using this to sort array
function cmp($a, $b)
{
return strcmp($a->date, $b->date);
}
usort($data, "cmp");
and works good but it only sort array by date and i want to in ordered array objects with pin=1 come first then other objects come after pins. i hope my question is clear,sorry for bad english !