I have an object student which has variables like student->name , student->age , student->marks , student->id
I have tried this :
i have done this to get sorted array of ids
foreach($student as $s){
array_push($student_id_array,$s->id) }
sort($student_id_array);
So i have the array of sorted id of student,
but how can i display 100 instances of $student in the same order a $student_id_array ?
This will sorts all your
$studentsarray based on each$student->id: