<?php $arr=array(1,2,3,4);$ans=0;$cnt=1;while($cnt<=3) {echo 'count:-'.$cnt;  for($i=0;$i<10;$i++){$ans+=$arr[$i];}$cnt++;} echo 'ans:-'.$ans;?>