I have a simple FOR that I need every 6 increments to send an echo with a message, follows code:
$carros = array("Volvo", "BMW", "Toyota", "Alfa Romeu", "WV", "Teste", "test2", "Teste4", "Teste3", "Teste5", "Volkswagem", "Ferrari");
for ($i=0; $i < count($carros); $i++) {
echo "Carro ".$carros[$i];
//quando chegar a 6, 12, 18, 24, 30... ele manda esse echo
echo "Página: ".$i;
}