PHP define and info from MYSQL

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I=92m creating a Multilanguage website usingdefine=92 for al menu

define( "WELCOME", "Hello" );
echo WELCOME ; // shows Hello

Now i need to do this with menu items loaded from MYSQL, so for

define( "WELCOME", "Hello " );
echo $SelectedFromMysql[1]; // $SelectedFromMysql [1] = WELCOME (in
mysql db)

$SelectedFromMysql holds the valueWELCOME=92, only instead of showing
=91Hello=92 it just dhows welcome. Does anyone know hoe to fix this ?

Thanks in advance

Re: PHP define and info from MYSQL escribió:
Quoted text here. Click to load it

If I understand correctly, you want to call a constant from a string
that contains its name. You can use constant():

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María:

Re: PHP define and info from MYSQL

Cool, Thanks, that did the trick :)

Site Timeline