You can use
sleep()
or usleep()
at the end of the cycle to delay the next iteration by a specified number of seconds or microseconds foreach ( $variable as $key => $value ) {
# code...
sleep(10); // 10 секунд
usleep(200000); // 0.2 секунды
}