I don't quite understand this. $result is the result of a mysql_query.
$requests = array();
while ($request = mysql_fetch_arr ay($result))
{
print("<p>");
print_r($reques t);
array_push($req uests, $request);
}
while ($request = each($requests) )
{
print("<p>");
print_r($reques t);
}
My thinking is that the while..each loop does the opposite of
array_push. However, this doesn't seem to be the case.
$request in the first loop looks like a single associative array.
$request in the second loop is a multidimensiona l associative array.
Can someone explain to me what is happening here?
--Bruce
$requests = array();
while ($request = mysql_fetch_arr ay($result))
{
print("<p>");
print_r($reques t);
array_push($req uests, $request);
}
while ($request = each($requests) )
{
print("<p>");
print_r($reques t);
}
My thinking is that the while..each loop does the opposite of
array_push. However, this doesn't seem to be the case.
$request in the first loop looks like a single associative array.
$request in the second loop is a multidimensiona l associative array.
Can someone explain to me what is happening here?
--Bruce
Comment