Since no array exists in the database, what does the fetch array command actually do?
It obviously gets all the field names and corresponding values from a database. But is one then responsible for creating an array?
Such as something along the lines of:
echo "
$colors[0] = 'blue'
$colors[1] = 'green'
$colors[2] = 'purple'
";
If so, I am unsure why it is called fetch array. Seems like it could be called or one could use, fetch row, adding a loop and the array construction above.
I am guessing the column name is considered the array key, with the value under that column the array value.
All of my books show how to build arrays. But none of them explains the array/database relationship.