This is the simple php example which is used for smarty foreachloop template.
<?php require './libs/Smarty.class.php'; $smarty = new Smarty; $smarty->template_dir = 'templates'; $arr = array(100, 100, 102); $smarty->assign('myArray', $arr); $smarty->display('foreachloop.tpl'); ?>