Posted by Janwillem Borleffs on 09/29/05 17:13
Siv Hansen wrote:
> My code is like this: - from the email class
> function checkInput($input){
> if(array_search('', $input)){
> $this->setError("All the fields must be filled out");
> return false;
> }
> return true;
> }
>
This will only work when empty elements have an index > 0. What you will
need to do is to use strict comparison:
if (false !== array_search('', $input)){
...
}
JW
[Back to original message]
|