I am setting up dialogflow in php to retrieve input from google assistant.
I want to use a parameter I got from dialogflow.
But I don't know how to get it out of the json.
I've already got a function that gets parameters from the json, but it's in a weird format.
How can I get only the pet_name in a variable?
The formats are:
When I use print_r I get:
Array
(
[pet_name] => gizmo
)
And when I do var_dump I get:
array(1) {
["pet_name"]=>
string(5) "gizmo"
}
Hope this makes it clearer