I could agree with that. my take on SMARTY is, if you are not comfortable with reading/writing some basic PHP code, you will not feel comfortable with SMARTY.
here is a SMARTY example
and that is just the HTML file. you (or someone) will still need to go into the PHP file and assign the actual data values to the variables in order for the data to print in the SMARTY template.Code:Name: {$name|capitalize}<br> Address: {$address|escape}<br> Date: {$smarty.now|date_format:"%Y-%m-%d"}<br> <table> {section name=mysec loop=$name} {strip} <tr bgcolor="{cycle values="#eeeeee,#dddddd"}"> <td>{$name[mysec]}</td> </tr> {/strip} {/section} </table> <table> {section name=mysec loop=$users} {strip} <tr bgcolor="{cycle values="#aaaaaa,#bbbbbb"}"> <td>{$users[mysec].name}</td> <td>{$users[mysec].phone}</td> </tr> {/strip} {/section} </table>
Here is an example of that assignment in SMARTY:
just your standard array inside of an array.Code:$smarty->assign('users', array( array('name' => 'bob', 'phone' => '555-3425'), array('name' => 'jim', 'phone' => '555-4364'), array('name' => 'joe', 'phone' => '555-3422'), array('name' => 'jerry', 'phone' => '555-4973'), array('name' => 'fred', 'phone' => '555-3235') ));not much different that just plain old PHP.
.


not much different that just plain old PHP.
