phpCopy<?php $string = "This is a string"; $lastCharPosition = strlen($string) - 1; for ($x = $lastCharPosition; $x < strlen($string); $x++) { $newString = $string[$x]; } echo "The last char of the string is $newString."; ?>