Re: Warning: Illegal offset type in

From: Date: Mon, 25 Mar 2002 16:37:59 +0000
Subject: Re: Warning: Illegal offset type in
References: 1 2 3 4 5 6 7  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3334@lists.php.net to get a copy of this message
On Mon, 25 Mar 2002, Joe Rice wrote: > > > Hi, > I have just tried chasing down the array. > with no luck, i just redefined the array: > > $search_results = array("0" => "joe rice"); > $t->assign("RESULTS",$search_results); > echo "<pre>";print_r($search_results);echo "</pre>"; > $t->display("searchresults.tpl"); > > searchresults.tpl now only contains 3 lines: > {section loop=r name=$RESULTS} > {$RESULTS[r]} > {/section} I see the problem. Your attributes are swapped, they should be: {section loop=$RESULTS name=r} -Andrei 'Any given program, when running correctly, is obsolete.' - First Law of Computer Programming

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