PHP Coding Tips

Showing posts with label strlen. Show all posts
Showing posts with label strlen. Show all posts

Monday, August 13, 2012

How to measure length of a string ?

If you want to check a length of the string in php, just user strlen() function. It will return the given string length. See example:if ( strlen( $unknownString ) > 10 ) { echo "String has more than 10 characters"; }