This may be a simple question but, I am not an seasoned PHP developer and I am hoping someone can show me some light.
Suppose I have PHP array:
$items = array('apple', 'banana', 'orange');
Nomarlly, when run the loop, using PHP foreach loop, it will go through each iteration one after another without any time delay.
What I need is,
foreach ($items as $item) {
Code to print 'apple'
Code to wait 5 seconds
Code to Print 'banana'
Code wait 5 seconds
.... And so on
}
It has to be strictly PHP no JavaScript please.
Thanks in advance.