<?php
//include '../backend.php';


$myfile = fopen("laundromats.txt", "r") or die("Unable to open file!");
// Output one line until end-of-file
while (!feof($myfile)) {
    // echo fgets($myfile) . "<br>";

    $pieces = explode(",", trim(fgets($myfile)));
//echo $pieces[0]; // piece1
//echo $pieces[1]; // piece2


    for ($i = 0; $i <= 5; $i++) {
        $pieces[$i] = trim($pieces[$i]);
    }
    print_r($pieces);
}
fclose($myfile);
?>