Php 如何显示json元素

Php 如何显示json元素,php,json,Php,Json,我有这个结果,但它不显示这个结果:$toto->speech $toto = json_encode($response); var_dump($toto); string(665) "{"id":"011d8627-d6f9-42e1-9f28-f64f273f5211","timestamp":"2017-08-28T01:15:42.16Z","lang":"en","result":{"source":"agent","resolvedQuery":"Hello","ac

我有这个结果,但它不显示这个结果:
$toto->speech

    $toto = json_encode($response);
    var_dump($toto);
string(665) "{"id":"011d8627-d6f9-42e1-9f28-f64f273f5211","timestamp":"2017-08-28T01:15:42.16Z","lang":"en","result":{"source":"agent","resolvedQuery":"Hello","action":"input.welcome","actionIncomplete":false,"parameters":[],"contexts":[],"metadata":{"intentId":"5293f9c1-0755-4df0-b97c-6406ddeef2c2","webhookUsed":"false","webhookForSlotFillingUsed":"false","intentName":"Default Welcome Intent"},"fulfillment":{"speech":"Hello! Welcome on Alicia Bot. I will tried to help you.","messages":[{"type":0,"speech":"Hello! Welcome on Alicia Bot. I will tried to help you."}]},"score":1},"status":{"code":200,"errorType":"success"},"sessionId":"8eadeb6f-8b32-43cb-8ed8-8e217d053a12"}"
现在我试着这样做:

echo '<br>--------<br>';
echo $toto->speech;
echo'
-----------
'; 回声$toto->语音;
试试这个

echo $toto->result->fulfillment->speech;

echo $toto["result"]["fulfillment"]["speech"];