如何用PHP对多维数组进行排序?

I've an array like below, what I want is to display record having row at the bottom whose "quotes" array is empty.

Array
(
[0] => Array
    (
        [id] => 0
        [regNo] => LHR7171
        [quotes] => Array
            (
            )

    )

[1] => Array
    (
        [id] => 2
        [regNo] => YN09 BYY (9)
        [quotes] => Array
            (
somevalues in array format
            )

    )
uasort(
    $i,
   function($value1, $value2) {
       return count($value2['quotes']) - count($value1['quotes']);
    }
);

And regarding the tags below your question: this has (of course) absolutely nothing to do with SF2 or Twig. This is just plain PHP.