$str = "my nAMe is Jason"; $arr1 = str_split($str); $count = count($arr1); for ($i=0;$i<$count;$i++) { echo $arr1[$count-1-$i]; }