It’s an inbuilt function of PHP. The strlen() function returns the length of a string.
[table caption=”” width=”100%” colwidth=”15%|15%|15%|55%” colalign=”left|left|left|left”]
Name, Required /Optional, Value Type, Description
string, Required, String, String to check the length.
[/table]
Returns the length of a string on success, and 0 if the string is empty.
[table caption=”” width=”100%” colwidth=”25%|75%” colalign=”left|left”]
PHP Version, Description
5.3.0, Prior versions treated arrays as the string Array thus returning a string length of 5 and emitting an E_NOTICE level error.
[/table]
<?php echo strlen("Hi from tutorialmines."); ?>
Output of above code in the browser is as below:
<?php echo strlen(""); ?>
Output of above code in the browser is as below:
In the digital age, the way we experience childhood has changed, but the essence remains the same—imagination, exploration, and joy.…
Looking for the perfect toy for your child can feel overwhelming with so many choices in today’s market. Whether you're…
In the heart of every child lies a world bursting with imagination — and the key to unlocking that world…
In the fast-paced world of growing cities and digital lifestyles, children need spaces where their imagination is free to roam.…
In a city as vibrant and diverse as Delhi, there’s a magic that lives beyond the monuments, food stalls, and…
In the vibrant and rapidly developing city of Noida, playtime is getting smarter, more imaginative, and more inclusive than ever…