I want to convert this array that Array[4] should not give null it can give blank space (empty string).
Array ( [0] => 1 [1] => 4 [2] =>
Then you should just loop through array elements, check each value for null and replace it with empty string. Something like that:
foreach ($array as $key => $value) { if (is_null($value)) { $array[$key] = ""; } }
Also, you can implement checking function and use array_map() function.