Hi Karmjeet,
check out the fallowing example
<?php
//To Create a string
$str = 'This is a test.';
//To Get the first character of a string
$first = $str[0];
//To Get the third character of a string
$third = $str[2];
//To Get the last character of a string.
$last = $str[strlen($str)-1];
?>
Nov 23, 2010