Personal I have three arrays received via POST:
[campo_habilita] => Array ( [0] => Habilitado
[1] => Habilitado
[2] => Habilitado )
[campo_nome] => Array ( [0] => Nome 1
[1] => Nome 2
[2] => Nome 3 )
[campo_nascimento] => Array ( [0] => 15-05-1990
[1] => 27-02-1983
[2] => 14-03-1987 )
I need to mount some conditions (if) before inserting the data in the database, however, I do not know how to mount the foreach by integrating the three arrays, in order to test the submitted data. (I do not know if this is the command to use for this)
One of the conditions is:
- if the (enabled_field = 'Enabled' and field_name = '')="show error";
Another condition is:
- if the (enabled_field = 'Enabled' and (default_field) == false)="show error";
Can you help me?