Welcome Guest, Not a member yet? Register   Sign In
How to delete multiple images
#1

(This post was last modified: 03-27-2022, 10:50 PM by luckmoshy.)

Hi all, May you help me with how to delete multiple images with modal.
I do for one file but I want to assign it like this (array) How?

PHP Code:
public function delete($images_id)       
      {
        
$data $this->model->find($images_id);
        
        
$imagefile1 $data['image1'];
        
$imagefile2 $data['image2'];
        
$imagefile3 $data['image3'];
        
$imagefile4 $data['image4'];
        
        if(
file_exists("imagedirector/"$imagefile)){

             foreach(
$imagefile as $delete){
                
unlink("imagedirector/".$imagefile ++);
             }            
        }
        
$this->model->delete($images_id);        
     } 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply


Messages In This Thread
How to delete multiple images - by luckmoshy - 03-27-2022, 04:00 PM
RE: How to delete multiple images - by rmcdahal - 03-27-2022, 09:13 PM
RE: How to delete multiple images - by luckmoshy - 03-27-2022, 10:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB