Dynamic Vars with spaces...
Posted: Mon Nov 07, 2005 5:51 pm
Maybe you guys will laugh at me, but I thought I would be able to create my vars directly from the my mysql data base, here is the script :
At first it seem a great idea, but as you guys probably figured out, some of my keys[$k] contains space. It works, even if the var name has a space, but I wanted to know if there was a way to access it... a var you can't access isnt really useful you know...
by the way, its my first post, and its not going to be my last!
Code: Select all
for($k=0;$k<count($keys);$k++){
$this->$keys[$k]=$myItem[$keys[$k]];
}by the way, its my first post, and its not going to be my last!