I have a following problem:
function send_notification(){
$jsonArray = json_decode($result);
$cont_sucesso += $jsonArray->success;
$cont_falha += $jsonArray->failure;
}
for ($i = 0; $i < $num / 1000; $i++) {
$Status = send_notification();
.....
}
console.log($cont_sucesso);
echo("Total SUCESSO: ".$cont_sucesso);
echo("</br>");
echo("Total FALHAS: " .$cont_falha);
echo("</br>");
echo "Total de mensagens enviadas: ".$cont;
I can not add the value of $jsonArray->success;
I have a loop and inside that loop I call function that returns jsonArray
But I need to add his return to display at the end of the loop, where am I wrong?
Edit: Json
{"multicast_id":5985558851077455261,"success":254,"failure":746,"canonical_ids":0,"results":[{"error":"NotRegistered"},{"message_id":"0:1478517570268212%f17b55e1f9fd7ecd"}]}