I am developing a ussd application and the api I am using only accepts json response in the following format
{
"ispin": 1,
"msisdn": "123456789",
"partnerid": 10,
"ShowInputBox": true,
"displaystring": "content to be displayed"
}
I have successfully worked on the php code that displays messages to users but cant add some formating to it. I want to include line breaks and hyperlinks. Can anyone identify any mistake in this code
<?php
$SESSION_ID = $_GET['SESSION_ID'];
$MSISDN = $_GET['MSISDN'];
$PartnerId = $_GET['PartnerId'];
$MNOID = $_GET['MNOID'];
$USSD_STRING = $_GET['USSD_STRING'];
$displaystring = 'Welcome to Polio Buddy. Please select.\n <a href="register.php">1 : Register Family</a>\n <a href="check.php">2: Check Vaccination Status</a>\n <a href="vaccinate.php">3: Vaccinate Child</a>';
$arr = array('ispin' => 0, 'msisdn' => $MSISDN, 'partnerid' => $PartnerId, 'ShowInputBox' => 'true', 'displaystring' => $displaystring);
echo json_encode($arr);
?>