{if $index==2 || $index==6 || $index==10 || $index==14 || $index==18 }
如何用数组来表达判断的选项,或者其他更加高效的方式?
{if $index==2 || $index==6 || $index==10 || $index==14 || $index==18 }
如何用数组来表达判断的选项,或者其他更加高效的方式?
$arr = array(2,6,10,14,18);
if (in_array($index, $arr))