JackJack Posted May 15, 2006 Share Posted May 15, 2006 How can i check how long a word is???My code is[code]}elseif(empty($_POST['username']) <= 3){ echo ' <font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"> • Invalid username: must be between 3 - 15 characters </font>'; $show_form = 1;}[/code]But its defently wrong [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] Ty Link to comment https://forums.phpfreaks.com/topic/9704-length-of-a-word/ Share on other sites More sharing options...
alpine Posted May 15, 2006 Share Posted May 15, 2006 [a href=\"http://no.php.net/manual/en/function.strlen.php\" target=\"_blank\"]http://no.php.net/manual/en/function.strlen.php[/a][code]$str = 'abcdef';echo strlen($str); // 6[/code] Link to comment https://forums.phpfreaks.com/topic/9704-length-of-a-word/#findComment-35939 Share on other sites More sharing options...
trq Posted May 15, 2006 Share Posted May 15, 2006 [a href=\"http://php.net/strlen\" target=\"_blank\"]rtfm[/a]. Link to comment https://forums.phpfreaks.com/topic/9704-length-of-a-word/#findComment-35964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.