...

View Full Version : strlen in if



rafiki
02-29-2008, 05:11 PM
Hi people,
what is the correct way to use strlen() in an if statement?


if (isset($_POST['message']) && (strlen($_POST['message'] => 20))){

resulting in

Parse error: syntax error, unexpected T_DOUBLE_ARROW in DIRTOFILE/file.php on line 63
Thanks in advance
Jamie West.

Inigoesdr
02-29-2008, 05:16 PM
Hi people,
what is the correct way to use strlen() in an if statement?


if (isset($_POST['message']) && (strlen($_POST['message']) >= 20)){

rafiki
02-29-2008, 05:18 PM
doh stupid me, its been a while, thanks ini

_Aerospace_Eng_
02-29-2008, 06:30 PM
This type of stuff is in the manual btw...

rafiki
02-29-2008, 07:28 PM
thing is i shouldn't of needed to look in the manual. school boys mistake :( thats the the only one today though :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum