I am trying to find a way to reverse a string, I\'ve seen alternatives but i wanted to to it this way thinking outside the box and not using anyone else\'s code as an altern
This will work
class StringUtils { public function stringReverse($string){ $arr1 = str_split($string); $arr2 = array(); for($i = count($arr1); $i >= 0; $i--){ $arr2[count($arr1) - $i] = $arr1[$i]; } return implode("", $arr2); } }