Cant see the issue

I cant see why
[php]
if(strlen($first_name < 11)) {
$this->first_name = $first_name;
}
[/php]
seems to work fine but
[php]
if(strlen($first_name > 1)) {
$this->first_name = $first_name;
}
[/php]
does not.

Maybe I need more sleep.

Thanks

Neither have valid syntax, you need to close strlen() before doing the comparison

[php]if (strlen($first_name) < 11)[/php]

Thanks m@tt, I guess I figured the syntax was right after the first one worked fine. All is good.

Sponsor our Newsletter | Privacy Policy | Terms of Service