place.txt is as folow:
a
b
c
destination.txt is as folow:
brussels
paris
madrid
this the code i think should work:
Code: Select all
<?php
$i= 0;
$fd = fopen ("place.txt", "r");
while (!feof ($fd)) {
$locationї$i] = fgets($fd, 4096);
$i++;
}
$i= 0;
fclose ($fd);
$fd = fopen ("destination.txt", "r");
while (!feof ($fd)) {
$placeї$i] = fgets($fd, 4096);
$i++;
}
fclose ($fd);
$result_des = array($locationї0] => $placeї0] , $locationї1] => $placeї1] ) ;
echo "The first line destination is {$result_desї"a"]}.";
?>thanx for helping