ajloun
02-20-2010, 12:04 AM
Hello
I know Little about Smarty i know how to assign Easy Vairble to Smarty like
echo $image ; to
$smarty->assign('image', $image);
But how i assign Loop .. this Code Below add Image For each 1 , if image equal 1 then add one image if image 2 add two images .. but i do not know how to assign it with smarty.
for($i=1;$i<=$image; $i++){
echo '<img src="/images/star.png" />';
}
i tried to do it like this
for($i=1;$i<=$image; $i++){
$smarty->assign('image', '<img src="/images/star.png" alt="" />');
}
but it only prints out one image .. regrads wht $image equals
I know Little about Smarty i know how to assign Easy Vairble to Smarty like
echo $image ; to
$smarty->assign('image', $image);
But how i assign Loop .. this Code Below add Image For each 1 , if image equal 1 then add one image if image 2 add two images .. but i do not know how to assign it with smarty.
for($i=1;$i<=$image; $i++){
echo '<img src="/images/star.png" />';
}
i tried to do it like this
for($i=1;$i<=$image; $i++){
$smarty->assign('image', '<img src="/images/star.png" alt="" />');
}
but it only prints out one image .. regrads wht $image equals