Created
November 29, 2011 03:31
-
-
Save violetyk/1403273 to your computer and use it in GitHub Desktop.
[php]配列の各要素に対して再帰的に処理を行うarray_wak_recursive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
array_walk_recursive( | |
$data, | |
create_function( | |
'&$val, $key', | |
'if(in_array($key, array("id", "created", "modified"))) $val = null;') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment