Created
February 11, 2013 22:03
-
-
Save jblac/4758024 to your computer and use it in GitHub Desktop.
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 | |
function replacer($array) { | |
$newArray = array(); | |
foreach ($array as $key => $val) { | |
foreach ($val as $k=>$v) { | |
if ($v == "" || $v === null) { | |
$newArray[$key][$k] = "empty"; | |
} else { | |
$newArray[$key][$k] = $v; | |
} | |
} | |
} | |
return $newArray; | |
} | |
$res = $this->replacer($res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment