I have a data like this
array([0] => stdClass Object ( [id] => 1 [title] => AAAA [sentence] => abcdefgh [rank] => 3 ) [1] => stdClass Object ( [id] => 2 [title] => BBBB [sentence] => ijklmn [rank] => 1 ) [3] => stdClass Object ( [id] => 3 [title] => CCC [sentence] => opqrstu [rank] => 2 ));
Show the data:
foreach($data as $d)
{
$title = $d->title;
$sentence = $d->sentence;
$rank = $d->rank;
echo $title. " | " .$sentence. " | " .$rank. "<br>";
}
How to sort it by 'rank'? Thanks for your help.