I'm getting about 500 rows back from a DB that my PHP script connects to and executes a query on. For each row returned, I display it in table format. Script works fine in Firefox, and ultimately works in IE, but users get a 'Stop Running This Script' prompt 1 or 2 times (and telling IE to continue..) before everything displays properly.
To get around this, I need to send some data back to the browser -- and I think the best way to do that is processing the array in chunks/batches. PHP has an array_chunk function, but i'm having trouble figuring out how to use it here.
To get the DB rows, I use:
$result = mssql_query($query);
... then to display them in a table:
while($row = mssql_fetch_array($result))
{
[DISPLAY TABLE ROW IN TABLE]
}
What is the best way to use array_chunk to process my array, say in chunks of 50?