I have edited this post having had a thought is there any way I can capture only the elements between the : or better still before this : into an array and then call those elements of the array.
Quote:
UKV1121:174914:Chris Sutcliffe EGNM😛ILOT::53.8692:-1.65584:696:0:1/B763/H-SDRY/C:M065:EGNM:F180:EGKK:IVANAT:B:4:1200:0:50:1:I:1450:1450:0:0:0:0:EGLL:CALLSIGN SKYWAYS // OP FLY UK VA //😛OL1X UY98 BARTN UN615 HON:::::::20051016144604:IvAp:1.1.3:2:4::S:110
working example of code please click here
code
PHP Code:
<?php
// Get a file into an array just to show info
$lines = file('http://www.flyukva.com/flyuk/leetestscripts/info.txt');
// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {
echo"" . htmlspecialchars($line) . "<br />\n";
}
$html = join ("",file('http://www.flyukva.com/flyuk/leetestscripts/info.txt'));
//prematch all that include the UKV part
preg_match_all("/UKV(.*)/i", $html, $flights);
//print_r($flights[0][0]);
//echo out the information based on the match
echo"<br><br>";
echo $flights[0][0] . "<br><br> " . $flights[0][1] . "<br><br>" . $flights[0][2] . "<br><br>" . $flights[0][3] . "";
?>
thank you for taking the time to look at this
regards
Lee