Create a counter variable outside of your myRecordHandler() function, and then within the function declare the counter variable as global, increment by 1 and include within your output as required; for example:
<?php $counter = 0; function myRecordHandler($record) { global $counter; $counter++; print $counter." ".$record["FIELD1"]." ".$record["FIELD2"]."\n"; } ?>
Hi,
Create a counter variable outside of your myRecordHandler() function, and then within the function declare the counter variable as global, increment by 1 and include within your output as required; for example:
<?php
$counter = 0;
function myRecordHandler($record)
{
global $counter;
$counter++;
print $counter." ".$record["FIELD1"]." ".$record["FIELD2"]."\n";
}
?>
Hope this helps!
Cheers,
David
--
MagicParser.com