help me with Date_Calc and Smarty
| From: | Sn!per | Date: | Fri, 22 Aug 2003 07:18:52 +0000 |
| Subject: | help me with Date_Calc and Smarty | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10105@lists.php.net to get a copy of this message | ||
php script:
<?
require_once "smarty/Smarty.class.php";
require_once "Date/Calc.php";
$tpl = new Smarty;
$cal = new Date_Calc;
$calmon = $cal->getCalendarMonth(8,2003);
$tpl->assign("days",$calmon);
$tpl->display("calmon.tpl");
?>
smarty's template:
<table border="1" cellpadding="2" cellspacing="0"
width="100%">
{section name=num loop=$days}
<tr>
<td>{$days[num][0]}
</td>
</tr>
{/section}
</table>
ouput:
20030728
20030804
20030811
20030818
20030825
i am really confused. pls advise. tia
--
---------------------------------------------------
Sign Up for free Email at http://ureg.home.net.my/
---------------------------------------------------