mysql - PHP - get value from database and display known value -


i've been searching while now.. it's simple can't seem right.

my website uses file translations. every translation has it's own variable.
like: $_text_login (which translates to: login or aanmelden or derp).

i've made menu table within database. 1 of menu items has text: $_text_login

obviously, when menu information, doesn't show set value of variable, shows $_text_login.

i've tried eval() doesn't work..

can help?

i not recommend approach , santize variable name, sounds of it, achieve saying with:

echo eval('return '. $item  . ';'); 

where $item result database.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -