2
Suppose I have one array in which each element of this array is a variable that stores a string within it.
Example:
error{
[nome] : null;
[sobrenome] : "sobrenome inválido";
[estado] : null; }
I’d like the program to identify if all the variables in that array sane null, then perform another routine.
error{
[nome] : null;
[sobrenome] : null;
[estado] : null; }
I tried to run that way, unsuccessfully:
if(!empty($error)){
$data["error"] = $error;
}else{
//executa outra rotina
}
And why do you need to know if they’re all null?
– Maniero
My goal is: if there is no error occurrence (all variables in this array are null), it goes down to the step that makes the inclusion of registered information (capturing inputs from my registration screen) in the database. I’m wearing a Restful pattern.
– Codeman