Code Snippets Php

the function strlen()
//display length of string(s)
$string1 = "beginners php";
$string2 = "myscripting";
//store the length of the strings in variables
$length1 = strlen($string1);
$length2 = strlen($string2);
//display the length of the strings
echo "String1 has $length1 characters";
echo "String2 has $length2 characters";
?>