I have an array structure that represents the file system structure
Array
(
[.config] => Array
(
[0] => database.ini
[1] => javascript.ini
[3] => project.ini
[5] => session.ini
[6] => system.ini
[.plugins] => Array
(
[0] => comments.ini
[1] => user.ini
)
...
I want to represent each file with its full (relative) path
Array
(
[0] => config/database.ini
[1] => config/javascript.ini
[3] => config/project.ini
[5] => config/session.ini
[6] => config/system.ini
[7] => config/plugins/comments.ini
[8] => config/plugins/user.ini
...
For the purpose I wrote this function
function recur($elem){
if(is_array($elem)){
return recur($elem);
}else{
return $elem;
}
}
And it is giving me
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes)