159. PHP Program to find the length of the string using static.
How does this program work?
- This program is used to find the length of the string using static using PHP.
Here is the code
<html>
<head>
<title>PHP Program To find the length of the string using static</title>
</head>
<body>
<?php
error_reporting(0);
$str = "SkillPundit";
$i = 0;
while ($str[$i] != '')
{
$i++;
}
echo "Given string :".$str."<br>";
echo "The length of the given string is : ".$i;
return 0;
?>
</body>
</html>