function str_reverse($str) { for ($i = strlen($str);$i >= 0;$i--) { $str2 .= $str[$i]; } return $str2; }