If you want the full code --> http://pastebin.com/m6ca41d10
PHP Code:
{foreach from=$completed_semester_classes key=a item=b}
<tr class="{cycle values='odd,even'}" style="font-size:0.8em;">
<td>{$form_data.{$a}_complete_sem.html}</td>
</tr>
{/foreach}
Gives me the error:
Code:
Fatal error: Smarty error: [in /apps/home/psychology/admissions_1.0/public/view/templates/admission.tpl.php line 90]: syntax error: unrecognized tag: $form_data.p{$a (Smarty_Compiler.class.php, line 446) in /apps/home/itwdid/lib/Smarty-2.6.18/libs/Smarty.class.php on line 1095
How can I get Smarty to recognize that I'm wanting to include the key of my array as part of the object I'm trying to call?
I'm trying {$form_data.p{$a}_complete_year.html} to accomplish {$form_data.p103_complete_year.html} and so on.
Bookmarks