flexible variables
| From: | Mircea Romanitan | Date: | Tue, 20 Feb 2001 16:41:33 +0000 |
| Subject: | flexible variables | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6787@lists.php.net to get a copy of this message | ||
Hello all.
I have a question.
How can i define some flexible variables?
Suppose i have a table with (id, town, phone).
In a file i have
define ("ID", "id");
define ("TOWN", "town");
define ("PHONE", "phone");
and after i send a query( SELECT * FROM table) to that db and got the query into an object,
i need to write:
echo $obj->ID;
echo $obj->TOWN;
echo $obj->PHONE;
but i cannot figure how?
I tried to use variable variables, but it don't work.
Thanks.
Mircea