I want to run specific command 4 times in a loop. How do i do that?
$list = array(
"data1", "data2", "data3", "data4", "data5", "data6", "data7", "data8", "data9", "data10", "data11", "data12", "data13", "data14", "data15", "data17"
);
$split_by = 4;
$total_execute = round(count($list)/$split_by);
for($i=0; $i<=count($list); $i++)
{
//1
//2
//3
//4 //execute command 1
//5
//6
//7
//8 //execute command 2
//9
//10
..............
}
How can i execute command in every 4 index and total $total_execute time in php? I have tried but its not working. i have no idea.
$total_executeneeded for?