This question already has an answer here:
In a foreach loop I upload some photos and store their values into one variable seperated by a comma as below
$photos.=$file_name.",";
When the files are uploaded, in the DB it is saved as
01461135_1015205099943781_302247337_n.jpg,11534328_56640920111689_2120954548_n.jpg,2160948_470329406422631_1521154943_n.jpg,
please mind the ,
at the end.
My aim is to echo them later like below
<li>
<img src="images/car1.jpg" />
</li>
My question is how can I separate the pictures knowing that the comma is at the end of the filename?
</div>