I couldn't fully work out how you store paths for images but I would do this:
have one field called 'images' or whatever and seperate them by an obscure character like . so an example of the contents of the field would be "mypath/img1.jpgmypath/hi.jpgmypath/cover.jpg" then the php to break it up and print them out would be:
// Create an array, each entry is string split by the ^
$images = explode("^", $mydbimagevar);
// Count how many entries are in the array
$count = count($images);
// Create a Counting Variable
$x = 0
// Start a while loop that prints all the variables.
while ($x <= $count) {
print("<img src=\"$images[{$x}]\" />");
$x++;
}
when you want to put images in (if you are doing it manually it doesn't matter) remember to add the new entry onto the end of the field data, not overwrite it so very crudely:
$my_img_var_to_go_back_into_db = $fieldcontents . "^" . $mynewpath;
The . acts like a combination operator, it adds strings or varaibles either side of it together.
Post back if you need more help and I will try ande help as soon as possible