I'm trying to echo after every iteration of a foreach loop in PHP. The echos aren't rendering until they are all done. I've tried the suggestions from various posts but none are working. Some of my code is:
echo $epTitle . "<br>";
echo "<div>" . '<img src="' . $imgSrc . '" height="70" width="70">';
echo "<button onclick='grabVid(" . '"' . $pageUrl . '"' ..")'>Grab</button>";
I've tried the following:
flush();
.
flush();
ob_flush();
.
while (ob_get_level() > 0)
ob_end_flush();
.
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
@ob_end_clean();
and other suggestions from: http://php.net/manual/en/function.flush.php and Echo 'string' while every long loop iteration (flush() not working)
Any suggestions? Thanks.