load variable value from mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

load variable value from mysql

Post by srdva59 »

hi,
i have some variable defined in a php file.
for example:

DEFINE( '_clientass', 'Cliente' );

so when i do a echo of _clientass they return Cliente
now i want call _clientass from a mysql row and return Cliente
If i do this: $row['variable'] he return _clientass but i want that the
php can return Cliente.

how can i do that?
thanks a lot for your help
:)
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: load variable value from mysql

Post by Jade »

You'll need to use the eval() function.
Post Reply