Posted by "Cal Henderson" on 08/18/05 03:13
Kathleen Krause-Thompson <kkthompson@tsl.state.tx.us> wrote:
: That doesn't quite answer my question. Here is another posting with
: the php.
:
: <?php
: for ($i=1;$i<=$_SESSION['budgetPos'];$i++) {
: $str = 'budget' . $i;
: if (isset($_SESSION[$str])) {
: $smarty->assign($str,$_SESSION[$str]);
: }
: }
change the php:
<?php
$bits = array();
for ($i=1;$i<=$_SESSION['budgetPos'];$i++) {
$str = 'budget' . $i;
if (isset($_SESSION[$str])) {
$bits[$str] = $_SESSION[$str];
}
}
$smarty->assign_by_ref('budgets', &$bits);
?>
then smarty:
{foreach from=$budgets item='budget'}
<p>Job Title: {$budget.jobTitle} Percent of Full
Time:{$budget.percentFullTime}</p>
{/foreach}
--cal
Navigation:
[Reply to this message]
|