Quick n00b ? how do you count characters?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AlbinoJellyfish
Forum Commoner
Posts: 76
Joined: Sun Apr 04, 2004 7:39 pm

Quick n00b ? how do you count characters?

Post by AlbinoJellyfish »

I need to count characters for a password. How do i do that? I want it so it needs to be at least 6 characters long.
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

maybe this will help
http://us3.php.net/count_chars
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Code: Select all

if(strlen($input) < 6){
echo "Error. Input must be 6 or more.";
}
else {
echo "Thanks for inputting a string with 6 or more characters! ";
}
[php_man]strlen[/php_man]() / [php_man]count[/php_man]()
Post Reply