Hello, it's my first post on these forums. 🙂
I have a problem with this code:
<?PHP
$lang = $_GET['lang'];
define('text_en', 'WORKS');
define('text_pl', 'DZIALA');
echo ("text_$lang");
?>
I want to that php file recognize the language provided in the url (ex. index.php?lang=en) and then echo the text corresponding to that language (ex. text_en). The problem is, that the php outputs "text_en" or "text_pl", when it should output constant corresponding to it (ex. WORKS). I'm fairly new in PHP, and I'm learning only by googling, but I couldn't find solution to this so I write there.
Cheers for any help,
Tankjer.