I am using php
and I want to be able place two fields from a query into an array.
I currently have the following which works well:
$sql = "SELECT * FROM table;";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$array[]=$row['field1'];
}
But I can't seem to work out how to read two fields:
$array[][]=$row['field1'] in the first, and $row['field2'] in the second;
So I should get:
$array [0][0] as field1
and
$array [0][1] as field2