{
"tripRoute": [{
"lng": 78.92939102,
"lat": 22.0533782
}, {
"lng": 78.92939102,
"lat": 22.0533782
}],
"bookingId": 195
}
this json obj in string format i am sending from android to php server. on php server string is printing correctly. but when i try to get "lng" "bookingId" from String is show null value . this is my php code.
// error on " ** line "
<?php
include('db_connection.php');
$json= $_REQUEST['tripRoute'];
$array = json_decode($json,true);
** $data = $array['tripRoute'][0]['lng']; // showing Null
** $flag['TripPathcode']= $array['bookingId']; // showing null
print(json_encode($flag));
?>
one more Questiong- see json string there - "lng": 78.9293102 ,"lat":22.0533 . there number 78.9293 and 22.0533 not in between " ". i saw other string there integer and double value also in between " ". does this create some problem ?
var_dump($json);give ?echo()or concatenation, for example).