php return length of variable code example
Example 1: Get PHP String Length
phpCopy<?php
$mystring = "This is my string";
echo("The string length in bytes is: ");
echo(strlen($mystring));
?>
Example 2: Get PHP String Length
phpCopy<?php
$mystring = "This is my string";
echo("The string length in bytes is: ");
echo(mb_strlen($mystring));
?>