1
How would I get the value of the login string and password inside a json_decode? What happens is that when I bring the result of a Curl:
$obj = json_decode($output);
The following message appears:
Your login details are: xxxxx login and password: YYYY
I tried to get the login as follows:
list($mensagem,$login) = explode("login:",$obj->info->cidade[0]->dados[0]->mensagem);
But he returns:
xxxxx and password: YYYY
You would need to take only the XXXXX for the login and YYYY for the password.
Perfect rray. Just one more question. The login and password can sometimes also contain numbers. Ex.: login: 2016_y1e3 and password: 1a3r. What would regex look like? Sorry for the question, because I don’t know much regex.
– user24136
@Fox.11 edited the answer, see if this is it.
– rray
It worked!! Thanks for the help rray.
– user24136