php delete file after read as array code example Example: php remove file if(file_exists($file)) { unlink($file); }