I'm pretty new to OOP. I'm tring to write a class that makes a call to Mysql and defines variables that are named the same names as the fields the query returns equating to their values. If there is a way to put a while loop into the variable deffinition of the class this would be really helpful. I am also trying to run this piece of code in the constructor function:
While(list ($key, $val) = each ($row)){
$this->row[$key] . $row[$val];}
Basicaly, I want to define my variables here. I know this doesn't work because PHP interprets "$this->row[$key]" as the name of the variable rather than interpreting the array first. I need help!!
Thanx,
J