Jump to content

[SOLVED] Display string of images from MySQL database?


jtapoling

Recommended Posts

Hello, I have the following string of images stored in a MySQL database that I want to display using PHP. Does anyone know how I can display the images individually?

 

Here is the way that the images come from the database. I used the field name "picture" to identify the referrence in the database.

 

http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-0.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-1.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-2.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-3.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-4.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-5.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-6.jpg,http://api.cdmdata.m7z.net/ftproot/DealerFiles/3306/Photos/1B3EL46X15N649956-7.jpg

 

They are comma seperated and I know I need to seperate them by defining the (,) character as the seperating value but I cannot for the life of me remember how. Any help would be great.

 

Thanks, Jeremy

just a suggestion:

 

given that the name of the images are not system generated and since ',' is a valid character for a filename, using ',' as a separator would cause some ruckus if ever the image filename has ','.

 

i suggest to use other unique character or combination of characters to separate them then use jonsjava's suggestion for exploding text with the delimiter you come up with.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.