How can I make this array with data from a database?
$array=array("a"=>"Apple","b"=>"Ball","c"=>"Cat");
I have a database table with column letter and value.
letter | value
|
a | Apple
b | Ball
c | Cat
I want "a"=>"Apple","b"=>"Ball","c"=>"Cat" to be values from the database, using for loop, how is that possible?
Many thanks for any help!