Run a loop for each semicolon

In my MySQL table I have a column with name “datei”. For now each field contains a path – e.g. fileadmin/media/pdf/AGB.pdf

This is how my PHP looks like:

$Inhalt .= '

I would now like to set the databse field to: fileadmin/media/pdf/AGB.pdf;fileadmin/media/pdf/anotherPDF.pdf;fileadmin/media/pdf/anotherFile.pdf

That mean in PHP I would need to run a loop that generates the same HTML for each path separated by the semicolon. How can I do this?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s