Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
Menu
strlen.php : strlen « String « PHP
PHP
String
strlen
strlen.php
<?php $pswd =
"secretpswd"
;
if
(strlen($string) < 10) echo
"Password is too short!"
; ?>
Related examples in the same category
1.
Calculating the length of a string
2.
Checking String Length
3.
Checking String Length: int strlen ( string string )
4.
Concisely checking the length of a trimmed string
5.
int strlen ( string str ) returns the number of characters in it: