php,从json解码到个别变量

I am trying to go from a cur request to a page with some info.

I have the curl working but I have trouble going from the decode json to individual php variables. the conten after json_decode is:

object(stdClass)#1 (2) { ["response"]=> object(stdClass)#2 (2) { ["request"]=> string(20) "mailboxes/status/get" ["result"]=> string(1) "0" } ["status"]=> string(7) "success" }

I need the value of result which is 0 here.

Thanks in advance.

$result = $data->response->result;

Assuming the variable $data is where you stored your json_decode. It returns an instance of stdClass, and viewing the vardump, you can see the structure and get the data you want.