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 
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.


Reply via email to