//从问题表中返回10个问题
$result = MysqLi_query($con,"SELECT question FROM questions ORDER BY rand() LIMIT 10' "); while($row = MysqLi_fetch_row($result)) { $que[]=$row[0]; }
现在我需要在会话变量中存储整套$que []. (即10个问题)
像这样的东西
$_SESSION['question'] = $que[]; $my_array[] = $_SESSION['question'];
所以$my_array [0]返回第一个问题,$my_array [1]返回第二个问题,就像那样.
(提前帮助Thanx)
分配
原文链接:https://www.f2er.com/php/135215.html$_SESSION['question'] = $que;
的print_r($_ SESSION [ ‘问题’] [0]);会给你第一个问题.