Reputation: 3
i have an array $error which tells me if any of my post vars produced an error or not:
Array
(
[pers_anrede] => 1
[pers_titel] => 1
[pers_vorname] =>
[pers_nachname] =>
[pers_vorwahl] => 1
[pers_telefon] => 1
[pers_email] =>
)
(where 1 means that the element has an error)
what is the most effective way to find out whether any errors at all are present? if all elements in my array are set to 0, i want to continue doing something else. if there is at least one error present, i want to display a general error message.
Upvotes: 0
Views: 350