strlen() gives you the size of the string take the median of that size and the resultant-1 will be the index of the string you need to show , here give it a try
[code=php]
<?php
$string="welcom e";
echo "string is ".$string." <br />";
$length=strlen( $string);
echo "total length is ".$length." <br/>";
$length=round($ length/2);
echo "middle string will be no ".$length." / the index number 3 which will be the fourh item in that string <br/>";
echo $string[$length-1];
?>
Comment