Sorting Multidimensional Arrays

For future reference really: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Controller::loadModel(’Student’); $students = array(); foreach ($courseStudents as $crsstd) { $students[] = array($crsstd, $this->Student->find(’first’, array(’conditions’ => array(’Student.id’ => $crsstd[’student_id’])))); }   function compare($x, $y) { if ( $x[1][’Student’][’lastName’] == $y[1][’Student’][’lastName’] ) return 0; else if ( … Continue Reading