I have a database with two fields and many rows with data in it, i want to put them in an array but i cant figure out how, been driving me crazy all day.
i want to do this to the data in the database
$data = array( col1 => col2,
col1 => col2);
etc... for all the col1 and col2 values in the database so i can call thing using
$value = $data["string"];
$value = $data["anotherstring"];
can someone gimme some code to add the 2 columns of data from database to this array?