<?php
echo strlen("foo bar");
?>
To get the length of a string strlen() function is used in PHP. In the code, we have passed a string which has the value - 'foo bar'. It will return '7' as an output as the string length.
0 Comments