Solution to display on a web page each second a new line wanted

S

Stefan Mueller

Hallo

I'm looking for a solution to display on a web page each second a new
line.
Unfortunately does the following solution not work with the Internet
Explorer:

http://test.seekware.ch/test/flush-withtable.php

PHP code:
<html>
<head>
<?php
header("cache-control: no-cache");
header("pragma: no-cache");
?>
</head>

<body>
<?php
echo "<table border = '1'>";

for ($counter = 0; $counter <= 5; $counter++) {
echo "<tr><td>" . $counter . "<br></td></tr>";

ob_flush();
flush();
sleep(1);
}

echo "</table>";
?>
</body>
</html>


Even if I do it without a table it does not work with the Internet
Explorer:

http://test.seekware.ch/test/flush-notable.php

PHP code:
<html>
<head>
<?php
header("cache-control: no-cache");
header("pragma: no-cache");
?>
</head>

<body>
<?php
for ($counter = 0; $counter <= 5; $counter++) {
echo $counter . "<br>";

ob_flush();
flush();
sleep(1);
}
?>
</body>
</html>


Does someone know a solution which works also with the Internet
Explorer?

Regards
Stefan

PS: Both solutions work with Mozilla and Opera.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top