I'm pretty new at PHP, and just starting to learn this MySQL stuff too...Can anybody start me off....
I've used the following to get my resultset:
mysql_query("SELECT * FROM insurance");
$num_rows=mysql_num_rows($result);
$num_fields=mysql_num_fields($result);
And can I loop through $num_rows & $num_fields to print the field names and values, but how do I put them into an array?
Here's an example of my table:
FRUIT COLOUR TASTE
apple green sweet
lemon yellow bitter
From my resultset I would like the above data to be effectively entered into an array like this:
$array=array(array(fruit=>'apple',colour=>'green',taste=>'sweet'),array(fruit=>'lemon',colour=>'yellow',taste=>'bitter'));