View Single Post
Old 02-14-2008, 01:02 AM   #6 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Using the examples above, you'd end up with an array of the file paths that you could pattern match / output as you wished.

For example, say your files field in your database contained:

Code:
/home/www/images/file1.png|/home/www/images/file2.jpg|/home/www/images/file3.gif
You would then select that field from your database and use something like:

PHP Code:
$filePaths explode('|'$result['filepaths']); 
The $filePaths variable would then contain an array that looked something like:

PHP Code:
// [0] => '/home/www/images/file1.png'
// [1] => '/home/www/images/file2.jpg'
// [2] => '/home/www/images/file3.gif' 
Which you could then manipulate as you wished.

To re-serialize the data, just use the implode() function.

Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
The Following User Says Thank You to Alan @ CIT For This Useful Post:
Orc (02-14-2008)