let's say if I have a txt file and inside has info sample like this:

```
amy,anderson,aldergrove,archery,anchovies,110
bill,bonds,burnaby,bowling,beer,100
cameron,carson,cameroon,cars,candy,120
henry,henderson,harrison,helping,hamburgers,90
dorothy,dust,denmark,driving,drinks,80
ed,edmunson,edmonton,eating,eggs,77
fred,fredrickson,fernie,flying,fries,140

```

and I want to use the file() and preg\_split() function to call it out and show as a table what's the easiest way to do it?
I know how to call it out using file() function but I'm not sure how to replace the , and make it look like a table.

<http://et4891.site90.com/sample.jpg> <---this is a sample of how I want it to look like.

Below is what I did to call out the txt file.

```
<?php
$fileContentsArray = file("aaa.txt");
echo "<table>";
foreach($fileContentsArray as $one_persons_data)
{
    echo "<tr>$one_persons_data</tr>";
}
echo "</table>"
?>

```

how should I modify this to make it look like the image I posted?

Thanks in adavance....