<foreach name="result" item="aa">{$aa.id}</foreach>
<?php if(is_array($)): foreach($ as $key=>$): echo ($aa["id"]); ?>