Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function killIndex($theKeyArray,$theMainArray){
- foreach($theMainArray AS $key => $data){
- if(in_array($key,$theKeyArray)){
- $theMainArray[$key] = null;
- unset($theMainArray[$key]);
- }elseif(is_array($data)){
- $theMainArray[$key] = killIndex($theKeyArray,$data);
- }
- }
- return $theMainArray;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement