its maybe a bit unclear.
What i want to do is getting all the data out of a db row, and storing this data in a variable with the name of the db column. To explain it:
Code:
\\ This is what i use right now
$sql = "SELECT * FROM pages";
$query = mysql_query($sql);
while ($output = mysql_fetch_array($query) {
$pageName = $output["pageName"];
$pageTitle = $output["pageTitle"]
}
But what i want is that it automaticly assigns the data of $output["pageName"] (and pageTitle) to a variable with the name of the column in the database.
I think i have to do someting with a foreach, but i'm not sure.
Hope this was clear.