I want to develop chat with facebook by jaxl.v3. This is my code
`$client->add_cb('on_chat_message', function($stanza) {
global $client;
// echo back incoming message stanza
$stanza->to = $stanza->from;
$stanza->from = $client->full_jid->to_string();
print_r($stanza);
sendMessage($client);
});`
This is my result that I print print_r($stanza) :

What's I ask now:
[text]=>hi value. how should I write? I am try my best a long time ago but I am still can't get value Hi from this array . pleases help me to solve it. Thanks
I am looking to see your reply soon.Try this:
foreach($stanza->childrens as $child) {
echo $child->text, '<br>';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With