I have an NSData from an API request in this format:
{
lat: "8.893891";
long: "76.621742";
radius: 100;
}
How can I convert this to an array in PHP or get value of lat in PHP?
I have an NSData from an API request in this format:
{
lat: "8.893891";
long: "76.621742";
radius: 100;
}
How can I convert this to an array in PHP or get value of lat in PHP?
maybe the function json_decode works for you
$datos = json_decode(
file_get_contents("api's address")
);
echo $datos->lat;
echo $datos->long;
echo $datos->radius;