Jump to content

Archived

This topic is now archived and is closed to further replies.

JackJack

Length of a Word

Recommended Posts

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

Share this post


Link to post
Share on other sites
[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]

Share this post


Link to post
Share on other sites
[a href=\"http://php.net/strlen\" target=\"_blank\"]rtfm[/a].

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.