02-14-2008, 01:02 AM
|
#6 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
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
|
|
|