Hi,
I am performing a MySQL SELECT (which returns multiple rows) to
$result and then extracting the results with
mysql_fetch_array($result).
I then want to build a number of arrays using the fields of each row.
Here is the relevant code:
<snip>
$result =
$i = 1;
while ($row = mysql_fetch_array($result))
{
extract($row); /* break the row into its fields */
$array0[$i] = $row[0]; /* 1st Field of Row */
$array1[$i] = $row[1]; /* 2nd Field of Row */
$array2[$i] = $row[2]; /* 3rd Field of Row */
$i++;
}
</snip>
Should this work? I am getting unexpected results when I try this.
Thanks.