MY NODE
SHARING MY KNOWLEDGE
Wednesday, July 21, 2010
How to get number of characters of a String in php - strlen()
You can use strlen() to easily find the length of an php string.
<?php $str = 'Hello World'; echo strlen($str); // 11 ?>
Many new php developers make the mistake of using count() which is used to count elements in an array or properties in an object.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment