sections
| From: | Peter J. Pieczora | Date: | Mon, 23 Sep 2002 04:10:26 +0000 |
| Subject: | sections | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6006@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to accomplish the following:
$query1 = "SELECT * FROM cpc_course_details WHERE id='$id'";
$result1 = mysql_query($query1);
while ($data1 = mysql_fetch_array ($result1)) {
$c_length .= $data1[c_length];
}
$smarty->assign("c_length", "$c_length");
and in my .tpl file
{section name=id}
{$c_length}
{/section}
which works fine, but in case when I try to load same .tpl file from the
database it doesn't. I mean page loads fine but variables are not being
passed.
I wonder what mistake do I make, and if there is a solution to this problem.
Cheers,
Peter