Originally posted by skeetley
Ok so right now I have [...]
#City Date/Time Temp Dew Vsby Wx Rh Chill Hdx Dir Spd Gust Cld Pres Day WC(index) WAE 2003/09/30 16:00 8.4 7.1 24.1 0 92.0 -99.0 -99.0 0 0 -99 0 1021.7 1 18 WAG 2003/09/30 16:00 19.5 -99.0 -99.0 0 -99.0 -99.0 -99.0 190 31 55 -99 -99.0 1 19 WAH 2003/09/30 16:00 17.5 12.4 -99.0 0 72.0 -99.0 -99.0 230 22 31 -99 1018.2 1 17 WAJ 2003/09/30 15:00 13.3 6.4 9.6 0 63.0 -99.0 -99.0 260 42 57 -99 1020.4 1 10 WAV 2003/09/30 16:00 6.1 1.1 -99.0 0 70.0 -99.0 -99.0 0 0 -99 -99 1026.3 1 17 WBA 2003/09/30 15:00 6.6 5.4 -99.0 0 92.0 -99.0 -99.0 170 18 -99 -99 -99.0 1 3 WBD 2003/09/30 16:00 4.6 -3.5 -99.0 0 56.0 -99.0 -99.0 350 1 -99 -99 -99.0 1 6 WBE 2003/09/30 15:00 7.5 2.8 14.4 0 72.0 -99.0 -99.0 300 29 42 -99 1014.6 1 3 WBF 2003/09/30 etc.......
$explode = explode(".", $string_from_file);
[...] [/B]
I think you can try with $explode = explode(" ", $string_from_file); because i look always any blank between two field.
And echo a "<br>" after each output.
(But when you get that output, try to look at html code (rigth-click on page, HTML...), you have to look if there are tags.)
All this sound like that:
<?php
$FileArray = file ("http://weatheroffice.ec.gc.ca/data/conditions/currcond.met");
for ($i = 0 ; $i < count($FileArray); $i++)
{
$explode = explode(" ", $FileArray[$i]);
echo "<br>line #".$i;
for ($j = 0 ; $j < count($explode); $j++)
echo $j.") ".$explode[$j];
}
?>