include('Smarty.class.php');
$cityArray =array( 51=> '北京', 52=>'上海');
$userInfo=array( 0 =>array('title'=>'aaa','city_id'=>52),
1 =>array('title'=>'bbb','city_id'=>51));
$smarty=new Smarty();
$smarty->left_delimiter='
$smarty->right_delimiter='}>';
$smarty->template_dir="template";
$smarty->compile_dir="template_c";
$smarty->assign("cityArr",$cityArray);
$smarty->assign("userInfo",$userInfo);
$smarty->display("section.html");