Good Morning,
I am currently working with a database table that has the following fields:
id | variable_name | value
I would like to do an SQL query that goes through row by row and creates variables for each row where the variable_name field becomes the name of a php variable with a value equal to the value field. So far I have:
$sql = "SELECT * FROM table_name";
$result = @mysql_query($sql, $connection) or die("Couldn't Execute Query.");
while ($row = mysql_fetch_array($result)) {
//Create each variable and assign its value
$variable_name_temp = $row['variable_name'];
$value_temp = $row['value'];
//Do something here to actually create the variable with the appropriate value
}
Any help and insight is greatly appreciated.
Thank you.