|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
maaa.om Smarty n00b
Joined: 12 Nov 2015 Posts: 1
|
Posted: Thu Nov 12, 2015 5:49 am Post subject: Error In smarty with foreach and Table |
|
|
Dear All,
I am beginner in smart, i try to make foreach loop for array, and when display the data, should display it in table, but this not working for me, this is my smarty:
Code: | <table>
<tr>
<th class="headerTitle" colspan="2">Education </th>
</tr>
{foreach from=$education item=foo}
<tr>
<td>{$foo->EntranceDate} <span class="tab"></span> {$foo->GraduationDate} </td>
<td>{$foo->InstitutionName}</td>
<td>[[{$foo->DegreeLevel}]]</td>
</tr>
<tr>
<td>{$foo->Major}</td>
</tr>
{/foreach}
</table> |
|
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Nov 13, 2015 9:08 pm Post subject: |
|
|
Code: | {foreach $education as $foo}
<tr><td>
{$foo|print_r:true}
</td></tr>
{/foreach} |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|