![]() |
PHP $_GET help please (a bit of a newbie question)
Hey guys, I'm just getting into PHP and have started on a site for someone, it will be dual language, and this is what I have so far:
PHP Code:
Is there any other easier way of achieveing this as well? I thought this was the easiest way I could find. Cheers Jason |
actually, $_GET['lang'] goes nowhere, as you call for a different variable afterward: $lang...
use $_GET['lang'] everywhere... |
Strangely enough - when I go down that road - it no longer works, but as my code above - that works fine ... any suggestions?
Cheers [edit] I removed the == and replaced with just one - I've put two in and it's fine now, but I still need to figure out how to default it to Dutch (when there is no ?lang=nl placed at the end of the script) |
PHP Code:
Anyway, mixing code and data is no good practice! I'd suggest to use a template engine. |
Quote:
Thanks for your help - I understand it better now. Jason |
Quote:
You might want to take a look at Smarty. |
Installed and experimenting - thanks guys, your help is very much appreciated :)
Jason |
All times are GMT. The time now is 08:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|