陣列的數據([0] => stdClass的對象([ID] => 1 [標題] => AAAA [句子] => ABCDEFGH [秩] => 3)[ 1] => stdClass Object([id] => 2 [title] => BBBB [sentence] => ijklmn [rank] => 1)[3] => stdClass Object([id] => 3 [title] = > CCC [sentence] => opqrstu [rank] => 2));
顯示的數據:
foreach($data as $d)
{
$title = $d->title;
$sentence = $d->sentence;
$rank = $d->rank;
echo $title. " | " .$sentence. " | " .$rank. "<br>";
}
如何通過 '等級' 排序呢?感謝您的幫助。
其**對象數組**!不僅僅是一些東西。答案是在生產代碼中使用[** usort **](http://php.net/manual/en/function.usort.php) – 2013-05-09 12:59:21