Re: Reserverd words in Smarty 1.3.0??

From: Date: Sat, 24 Feb 2001 16:23:24 +0000
Subject: Re: Reserverd words in Smarty 1.3.0??
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-211@lists.php.net to get a copy of this message
I did test it... the $results in the class should have no affect on the assigned variable names. Is anyone else seeing this problem? Serge Sozonoff wrote: > > Hi Monte, > > The only thing that bothers me with this is if I change the word "results" > to something else > it works fine with no Array being printed. > > I also noticed that you have a variable called $results in the Smarty class. > > I have not had a chance to run things through the debugger to see what > really happens, > but you might like to have a quick check through your code anyway. Try a > code snippet for > yourself using "results" like: > > > while ($row_array = $db->FetchNext()) { // fetch rows > > $smarty->append("results", $row_array); > > } > > and run it though a {section} > > Thanks, > Serge > > -----Original Message----- > From: Monte Ohrt [mailto:monte@ispi.net] > Sent: Friday, February 23, 2001 15:19 > To: Serge Sozonoff > Cc: Smarty (E-mail) > Subject: [smarty] Re: Reserverd words in Smarty 1.3.0?? > > There shouldn't be any "reserved" variables that you can't assign. You > might write over a previously assigned variable, but that's about it. > > Try to var_dump($results) to see the data structure are assigning to > Smarty. I know that if you assign an array to Smarty and then try to > print the array like {$results}, then Smarty will output the word > "Array", just like PHP does. > > Serge Sozonoff wrote: > > > > Hi Monte and Andrei, > > > > Is "results" some sort of reserved word in a {section} section? > > > > I tried doing this in the php file > > > > while ($row_array = $db->FetchNext()) { // fetch rows > > $smarty->append("results", $row_array); > > } > > > > and > > > > {section name=firsttable loop=$results} > > <TR> > > > > <TDWIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILEN > AME}</FONT> > > </TD> > > > > <TDWIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILEM > ODIFIED}</FONT></TD> > > > > <TDWIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILEM > ODIFIED}</FONT></TD> > > </TR> > > {sectionelse} > > > > in the template and it outputs fine, but amends the word "Array" at the > end > > of the page?? > > > > If I change it to "qresults" instead of "results" then the > > "Array" word > > dispears in the > > output. > > > > Are there any other "reserved" words like this? > > > > Thanks, Serge > > > > --- > > You are currently subscribed to smarty as: monte@ispi.net > > To unsubscribe send a blank email to $subst('Email.Unsub') > > Visit Smarty's homepage at > > http://www.phpinsider.com/php/code/Smarty/ > > -- > Monte Ohrt <monte@ispi.net> > http://www.ispi.net/ > > --- > You are currently subscribed to smarty as: serge.sozonoff@globalbeach.com > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.smarty.general (#211) next »