<?php
$p = array("message" => "Success making api call", "result" => 657890);
if(isset($_POST['data']))
{
$p['data'] = "You must have sent some json data";
}
$p["prof"]["name"] = "James";
$p["prof"]["cycle"]["rad"] = "79%";
header("Content-type: application/json");
echo json_encode($p);
?>