I have a database table called “settings”, and in that table I’ve got 2 columns. Example picture:

As you can see, the first columns is called “setting_name” and the second is called “setting_value“.
How can I do, so whenever I write example:
echo $setting['ad_cost_micro'];
It will print out:
0.00200
Btw. is it possible to do without a while statement?
I tend to use PDO, and
fetchAll().Note: Regardless of what you use, a while loop is unavoidable because you HAVE to loop through the result set (
fetchAll()) does that too, also, know that every loop is a while loop (even for loops!).