I’m new to smarty. I’m trying to use switch and case function with smarty. This is the php code I use
$i=1;
while ($row = mysqli_fetch_array($sql)){
switch($i%8){
case 1:
case 2:
//DO Something Here
break;
case 3:
case 4:
case 5:
case 6:
case 7:
case 0:
//DO Something Else Here
break;
}
$i++;
}
My question is how do i apply this code to Smarty? Appreciate your time.