OK I have been on this all weekend trying tio figure this out my head is sore and my eyes square.
now I have beenlooking at the explode function.
<?php
echo "<b>Original text file element for display purpose only</b><br><br>";
//echo out original data for display purpose
$html = join ("",file('http://www.flyukva.com/flyuk/leetestscripts/info.txt'));
echo $html;
echo "<br><br>";
//call to file gather information
$html = join ("",file('http://www.flyukva.com/flyuk/leetestscripts/info.txt'));
//$html1=str_replace(':', '-', htmlspecialchars($html));
//prematch all that include the UKV part
preg_match_all("/UKV(.*)/i", $html, $flights);
echo "<b>Array data</b><br><br>";
print_r(explode(':', $flights[0][0], -1));
echo "<br><br>";
print_r(explode(':', $flights[0][1], -1));
echo"<br>";
echo"<br>";
print_r(explode(':', $flights[0][2], -1));
echo"<br>";
?>
working example click here
i have now select only the UKV elements and placed them in an array It now explodes this array and seperates the different elements based upon the : seperator.
what I cant understand or am failing to grasp is how to grab only a certain element for example UKV1122 from the first array and display that to the screen.
any help would be great i think am close but I could be a million miles away here and feel like am going in circles.
thanks for your time and for taking a look.
kind regards
Lee