一個隨機值,我有這個數組PHP如何從陣列
$row4 = mysql_fetch_array($sql_res);
誰能幫助我如何獲得的$row4['response']
隨機值?
的$row4
沒有固定值...
但現在$row4
包含
Array ([0] => 3 [id] => 3 [1] => where is dryad [react] => where is dryad [2] => Dryad is found in the farthest part of the Dark wilderness. [response] => Dryad is found in the farthest part of the Dark wilderness. [3] => [review] =>) 1
什麼包含$ row4 ['response']? – Salepate 2012-04-04 00:58:45
請參閱http://php.net/array-rand – Pete 2012-04-04 00:58:46
或者你想要一個隨機的行嗎? http://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql – alberge 2012-04-04 01:00:50