Re: Reserverd words in Smarty 1.3.0??

From: Date: Fri, 23 Feb 2001 14:18:41 +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-199@lists.php.net to get a copy of this message
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> > <TD > WIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILENAME}</FONT> > </TD> > <TD > WIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILEMODIFIED}</FONT></TD> > <TD > WIDTH="150"ALIGN="CENTER">{#TableDetailsFont#}{$firsttable/results.FIL_FILEMODIFIED}</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/

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