Re: [SMARTY] assign() Problem - Urgent

From: Date: Mon, 14 Jul 2003 07:35:56 +0000
Subject: Re: [SMARTY] assign() Problem - Urgent
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9885@lists.php.net to get a copy of this message
urgent? of course it's urgent. everybody's problem is urgent for him personally. it's a real stupid extension to a subject on a mailing-list-post which makes me often hesitate to answer. anyway: you want to use "append" in your loop and not "assign", see the docs about the difference of the two. greetings messju On Mon, Jul 14, 2003 at 12:23:05AM -0700, Balaji Nallathambi wrote: > Hi all > > My Code looks like below > > this is index.php > > $arrayptr; > $recordPtr; > // $result="select * from projectdetails" > while($mydata=mysql_fetch_row($result)) > { > $arraptr=0; > $smarty->assign("ProjectID",array($arrayptr,$mydata[0])); > $arraptr = $arraptr+1; > } > > The value in the Database for Projer ID are > P100 > P200 > P300 > > in the Template file iam using like below > > index.tpl > > {section name=Project loop=$ProjectID} > > id: {$ProjectID[Project]}<br> > > {/section} > > Iam getting only the last value stores that is > > id :P300 is printed > > I don't how to get the values from the other's ls help me to solve the problem. > > > > > > > > --------------------------------- > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month!

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