0

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?

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
Haris
  • 126
  • 3
  • 11

1 Answers1

0

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;