here i have json output as below.what i want do is i want to take scope,production,refreshtoken,access_token as separate php variables from var_dump output.
here is the json output
array ( 'status' => 'OK', 'statusCode' => 200, 'time' => 1.628268, 'header' => array ( 0 => 'HTTP/1.1 200 OK Date: Fri, 06 May 2016 06:22:42 GMT Server: O2-PassThrough-HTTP Content-Type: application/json Pragma: no-cache Cache-Control: no-store Transfer-Encoding: chunked ', ), 'body' => '{"scope":"TARGET","token_type":"bearer","expires_in":2324,"refresh_token":"4567f358c7b203fa6316432ab6ba814","access_token":"55667dabbf188334908b7c1cb7116d26"}', )
Here is my php
var_dump($r);
echo $var[0]."<br>";
echo $var[1]."<br>";
echo $var[2]."<br>";
echo $var[3]."<br>";
echo $var[4]."<br>";
echo $var[5]."<br>";
echo $var[6]."<br>";
echo $var[7]."<br>";
echo $var[8]."<br>";