I have created total api's using php programming, for the output i used
json_encode($arr)
Now i want to print output by replacing null with "".
I have already completed 400+ webservices using json_encode($arr) to output, but i don't want to change to
can any body help
My Actual Array
$array=array("id" => "2",
"name" => "Test Name",
"address" => "83 Test Street",
"city" => "Test",
"phone" => "(123) 456-7890",
"video_thumb" => null,
"thumbnail" => null,
"description" => null);
echo json_encode($array); //output:
{"id":"2",
"name":"Test Name",
"address":"83 Test Street","city":"Test","phone":"(123) 456-7890","video_thumb":null,
"thumbnail":null,
"description":null
}
Expecting output //output
{"id":"2","name":"Test Name",
"address":"83 Test Street",
"city":"Test","phone":"(123) 456-7890","video_thumb":"",
"thumbnail":"",
"description":""}