- json_encode: documentation ( source)
<?php
$data = array(
"to" => "cMbucIFcJMA:APA91bH_..... ",
"notification" =>
array(
"body" => "sadeq",
"title" => "test notification"
)
);
echo json_encode($data);