I have my delete function after file is deleted it will print all deleted file in array like this bellow
Array (
[0] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php
[1] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt.htaccess
[2] => [Directory]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt
[3] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\page.html
)
The main directory is jquery-sandbox
And sub directory which was deleted and it file content is zuuttt
Now my problem is that i have two files inside zuuttt
which i don't want it to show it deleted array list i want it to be hidden i tired to do this but it still show the files.
<?php
//The delete is working fine and below here is from my class
$result = $rmjails->remove($deletethis);
//This is what i tried to hide it with
if(is_array($result)){
$hide = array('.htaccess','default.php');
$filtered_array = array_filter($result, function ($element) use ($hide) { return ($element != $hide); } );
print_r($filtered_array);
}
//==============
//This is default one i was using
if(is_array($result)){
print_r($result);
}
?>
How can i hide that two files .htaccess
and default.php
?
2 additional questions
My question yesterday was not answers till now please i need a help about that
Having multiple htaccess in a root directory
How can i print out the deleted files and directories without showing it in array Array ([0] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php)
so it will look like this [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php
Thank you