Hi, I'm trying to do an album system and need some help with arrays. I have a table in my database called albums and in there I have two columns: album_id & album_images. album_id is set to be INT with auto-increment, and inside album_images is where I add all the images that will be inside the "album". the data inside the album_images row would look like this: KZ84U.png||RTqbB.jpg||0xk5B.png||qiof.jpg||TAtJa.png||lvkwY.jpg||kEejG.jpg||7hEt.jpg||oUreT.jpg||i1IA.jpg||JNYQp.jpg||8C5D.jpg Code (markup): so then I can use explode function and separate each image name and display in a page. I am having trouble adding and removing single/multiple images from the array generated with the explode function. so basically what I want to be able to do is, if for example I want to remove image "lvkwY.jpg" the album_images row will be updated without including the image i removed from the album, same with multiple images. also when I want to add new images, how can I check if an image I am trying to add is already in the array ?? I would appreciate any help with this, I really have no clue how I can do this. Thanks !
$album_images = explode ("|",$album_images); foreach($album_images as $key=>$value){ if ($value == $ToBeDeleteImage) unset $album[$key]; } Code (markup):