assign() Problem - Urgent
| From: | Balaji Nallathambi | Date: | Mon, 14 Jul 2003 07:23:05 +0000 |
| Subject: | assign() Problem - Urgent | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9884@lists.php.net to get a copy of this message | ||
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!