Chatfuel gives this as a way to respond back:
{
"messages": [
{"text": "Welcome to the Chatfuel Rockets!"},
{"text": "What are you up to?"}
]
}
I want to output something like this with My text, but keys with same value are not possible, since it outputs the first key with the last value
<?php
$arr = array(array('messages' => array('text' => "Text 1", 'text' => "text
2")));
if ("test" == "test"){
echo json_encode($arr);
}
Output: [{"messages":{"text":"text 2"}}]
How do I output a way like requested by chatfuel?