PHP Coding Tips

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"; }

1 comment:

  1. Hi! Did you ever experience a situation when a random person has robbed you online and took your personal ideas? Can't wait to see your answer.

    ReplyDelete