$handle = fopen("road.txt", "r");if ($handle) { while (($line = fgets($handle)) !== false) { $t = explode(",", $line); if(isset($t[0]) && strpos($t[0], "London") === false){ $road = trim($t[0]); // Use $road. } } fclose($handle);}