Thanks for this latest reply. I would try that on out but first I like to say are a great guy Anthony. Salath, Kalon and guys on this forum are great and am happy to be on this forum. I am inspired and it is my desire to be good in PHP like you guys.
Below is what I did earlier with your suggestion which i modified and the corresponding output whose result is satisfying:
—my code----
<?php
error_reporting(-1);
ini_set(‘display_errors’, true);
$file = fopen(‘track20100819.txt’, ‘r’);
for($line = 1; false === feof($file); $line++){
$entry = fgets($file);
if(in_array(substr($entry, 0, 6), array(‘$GPRMC’))){
$a = explode(",", $entry);
print_r($a[0], false);
echo "<br>";
}
}
fclose($file);
?>
----my output—
$GPRMC 040100.284 04 01 00.284 14460.28 V 190810 N47
$GPRMC 040111.000 04 01 11.000 14471.00 V 190810 N49
$GPRMC 040123.000 04 01 23.000 14483.00 V 190810 N48
$GPRMC 040135.000 04 01 35.000 14495.00 V 190810 N4F
$GPRMC 040142.011 04 01 42.011 14502.01 A 6009.33584 N 02444.63728 E 1.8 325.0 190810 19 08 10 6.9 W A1F
$GPRMC 040154.000 04 01 54.000 14514.00 A 6009.33325 N 02444.63796 E 190810 A6B
$GPRMC 040206.000 04 02 06.000 14526.00 A 6009.31657 N 02444.64591 E 190810 A6F
$GPRMC 040218.000 04 02 18.000 14538.00 A 6009.31536 N 02444.64979 E 1.3 244.6 190810 19 08 10 6.9 W A1E
I think am gaining from this forum. I appreciate.
Now I would go on to try out your latest post which am sure would work out well too.
My next step would be to be able to read in multiple text files so I can just use only one code to to extract. I would set to work on that and hope that you guy would have to help me if I come calling.
Thanks to you all.
Best Regars
Paul