Do you really need tables? CSS can do just about anything.
Duncan wrote:
Hi,
I am currently working with the output control functions and they work like a charm - as long as I don't start using IE to view my test page.
I put together the below code from a couple of comments on php.net and it works like a charm with mozilla, where the content gets displayed with each loop run - but as soon as I start using tables then IE waits until the table gets closed to display the output, so it basically waits until everything is put together anyway and outputs it all.
So, mozilla starts drawing the first table which gets surrounded by the first table border, then the next table appears so that both get surrounded by the first table border and so on. IE simply keeps on loading until all 3 parts of the array have been put together and then starts displaying the output in the window.
So, my question: is there a way to make IE display the flush'ed output even when I am using tables? I guess I am simply making a stupid mistake here, but so far all my tries resulted in IE not being able to use flush() within tables (e.g.: remove the surrounding table and it will work just fine again).
S.o. mentioned in the php.net comments that the < tr > tag is causing those problems, but I tried all kind of combinations to no avail.
However, since I see that kind of output control on several sites I assume there has to be some kind of way to get the data displayed before the table structure has been closed again - or is that an ASP only feature?
Any help would be appreciated,
Duncan
<?php $arg[0] = '<table border=1><tr><td><table><tr><td>Line 1</td></tr></table></td></tr>'; $arg[1] = '<tr><td><table><tr><td>Line 2</td></tr></table></td></tr>'; $arg[2] = '<tr><td><table><tr><td>Line 3</td></tr></table></td></tr></table>';
ob_start(); for ($j=0; $j != sizeof($arg); $j++) {
@eval("?>" . $arg[$j] .str_pad(" ", 300). "<?php "); ob_get_contents(); ob_flush(); flush(); sleep(5); }
ob_end_clean(); ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php