4
I have to requisition one json
for a api
, but I have to redeem data from a form to complement this json
, the problem is that when rescuing the data into a variable I cannot put it in the correct way inside that json
, I tried to concatenate in several ways and the value is never passed correctly.
$str = '{
"clienteLogin":
{
"Token":"29b3bcbde41b48058bf410da09910849",
"Operador":"",
"IdUnidadeNegocio":8,
"PalavraCaptcha":"",
"nome": "$nome", //variavel 1
"cadastro":"on",
"Email": "$email" // variavel 2
},
"mesclarCarrinho":true,
"Token":"29b3bcbde41b48058bf410da09910849",
"IdUnidadeNegocio":8,
"Operador":""
}';
This array comes from where? are you mounting with PHP strings?
– Sergio