Sure - you can stop the parser by returning TRUE from your myRecordHandler function; so all you need to do is keep a global counter, increment the counter for each record and then return TRUE if has reached the number you wish to display. For example:
<?php function myRecordHandler($record) { global $counter; // display $record as normal $counter++; if ($counter == 2) return TRUE; // stop after 2 records } ?>
Hi,
Sure - you can stop the parser by returning TRUE from your myRecordHandler function; so all you need to do is keep a global counter, increment the counter for each record and then return TRUE if has reached the number you wish to display. For example:
<?php
function myRecordHandler($record)
{
global $counter;
// display $record as normal
$counter++;
if ($counter == 2) return TRUE; // stop after 2 records
}
?>
Hope this helps!
Cheers,
David.