Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.