I have to read a PHP array for empty values. If there are any empty values for any key, I just wanted them to be filled with some default value if empty.
1. Is there any in built function to check if empty in an array and fill it up?
(OR)
2. What is the procedure to accomplish this requirement?
array array_filter ( array $array [, callable $callback ] )call back is a simple function to check empty() that would provide you with a list of keys with empty values in them as a result array you can then populate