知道为什么我不能在循环外回显 $a 吗?我错过了什么?
while (list($a) = $db->fetch_array($query))
{
$b = $a; //where $a = 10
}
echo $a; //this echo's nothing.
echo $b; //this echo's 10
知道为什么我不能在循环外回显 $a 吗?我错过了什么?
while (list($a) = $db->fetch_array($query))
{
$b = $a; //where $a = 10
}
echo $a; //this echo's nothing.
echo $b; //this echo's 10