I have a cURL statement that invokes a WS. The response from this WS is stored through:
$reference = var_dump(json_decode($exec, true));
return $reference;
Given that I have this in one function, in the other file I read as follows:
$var = ob_get_clean();
This is where I echo and give the result below:
array(4) {
["InvoiceIdOut"]=>
int(945)
["FiscalDocumentNumber"]=>
string(7) "AAAA945"
["InvoiceURL"]=>
string(34) "http://teste.pt/maistestes/AAAA945"
["ErrorMessage"]=>
NULL
}
However, I'm not realizing how I can pull data and save it in variables.