I have an array, the array key contains the file name and array value will be another array which contain sfile size,date etc.
In these array list, I want to store only xls and xlsx files alone. I need to remove files of all other extensions.
Is there any predefined function in PHP?
Note: i have constant variable this varaible contain the like VAR_FILE_EXT= "xls, xlsx, csv"
[sample.xls] => Array (
[size] => 3353
[uid] => 1012
[gid] => 1013
[permissions] => 33188
[atime] => 1338497357
[mtime] => 1338497357
[type] => 1
)
[sample.csv] => Array (
[size] => 3353
[uid] => 1012
[gid] => 1013
[permissions] => 33188
[atime] => 1338497357
[mtime] => 1338497357
[type] => 1
)
[sample.txt] => Array (
[size] => 3353
[uid] => 1012
[gid] => 1013
[permissions] => 33188
[atime] => 1338497357
[mtime] => 1338497357
[type] => 1
)
in this example i want remove only sample.txt array keys and its corresponding values.
array('sample.xls'=>array(...), 'sample.csv'=>array(...)?