strlen() php code example
Example 1: ucfirst() php
<?php
$foo = 'hello world!';
$foo = ucfirst($foo);
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar);
$bar = ucfirst(strtolower($bar));
?>
// string manipulation function
Example 2: how to check php string length
<?php
$name = 'abcdef';
echo strlen($str);
$string = ' ab cd ';
echo strlen($str);
?>
Example 3: php string length
<?php
$str = 'Hello World!';
echo strlen($str);
?>
Example 4: strlen php
<?php
echo strlen("Hello world!");
?>
Example 5: php serialize()
php array to be storable value in $_SESSION:
serialize($array)
serialized array element to be output on page:
unserialize($serializedArray)