strlen():-



The strlen() function returns the length of a string.


code:-



<?php

$char = 'B';
$nextchar = ++$char; 
 
if (strlen($nextchar) > 1) 
{
 $nextchar = $nextchar[0];
 }
echo $nextchar."\n";
?>


output:- c























Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post