Hello all,
I want to get only the file name of "findFiles" function, but the code does not work.
What am I doing wrong?
<?php
function borrar($path) {
$path = basename($path);
return true; // $path? Neither works.
}
$archivos = FileHelper::findFiles('uploads/',$options = ['filter'=>'borrar']);
var_dump($archivos); ?>
I solved my problem using "array_map("borrar", $archivos)", but I wonder how it is done using "findFiles".
Thank you.