I would like to interpret a JSON with PHP , where:
{"data":
{
"nome1":João,
"status":["Ativo"]
}
}
$retorno = json_decode($jsonRet);
$nome1 = $retorno->data->nome1;
$status = $retorno->data->status;
echo "nome1: ".$nome1." / ".$status;die;
The nome1
, I can read this normally, but the status that is enclosed in brackets does not work, returns with nothing ...
How would it be to read correctly?