Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Flight::map('recursiveRemoval',function(&$array, $rKey){
- if(is_array($array))
- {
- foreach($array as $key=>&$arrayElement)
- {
- if(is_array($arrayElement))
- {
- Flight::recursiveRemoval($arrayElement, $rKey);
- }
- else
- {
- if($key == $rKey)
- {
- unset($array[$rKey]);
- }
- }
- }
- }
- });
- $tmp = array('text','name');
- Flight::recursiveRemoval($tmp, 'text');
Advertisement
Add Comment
Please, Sign In to add comment