Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY

From: Date: Thu, 12 Feb 2004 12:14:34 +0000
Subject: Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2104@lists.php.net to get a copy of this message
Thanks for your help. Yea I found that using global variables we can get that variable out.. * just to note I am more than 2 years a PHP developer. Regards, - Muhammed ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: "Muhammed Mamedov" <mm@ytm.com.tr> Cc: "Smarty Dev" <smarty-dev@lists.php.net> Sent: Wednesday, February 11, 2004 7:52 PM Subject: Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY > On Wed, 2004-02-11 at 09:54, Muhammed Mamedov wrote: > > Hi everybody! > > > > I have a big problem here... > > I have a web site in PHP and want to convert it into SMARTY style. > > > > I have calls like this in my main file (old one, with no SMARTY): > > main.php?lang=en&cn=1 > > > > How can I catch this variables in my template? > > > > I tried this and it didn't work: > > index.php (SMARTY based) > > $smarty->assign("portal",$lang); > > $_GET['lang'] would contain your value from the URL for sure. $lang > might or might not have it depending on your globals setting and your > context. > > You need some basic training in PHP before you tackle Smarty. > > >

« previous php.smarty.dev (#2104) next »