function reverse_and_capitalize($str) { $words = explode(" ", $str); for ($i = count($words) - 1; $i >= 0; $i--) { echo(ucfirst($words[$i]) . " "); } }?>
function reverse($str) { $str_arr = explode(" ", $str); for($a = count($str_arr) -1; $a>=0; $a--) { echo ucfirst($str_arr[$a])," "; } }
$str2 = explode(" ", $str); $str3 = array_reverse($str2, " "); echo ucfirst($str3);}
{ $str_array = explode(" ", $sentence); for ($x = count($str_array)-1; $x >= 0; $x--) { print strtoupper($str_array[$x][0]).substr($str_array[$x], 1)." "; } }?>
$arr = explode(" ", $str); $arrReverse = join(array_reverse($arr), " "); echo ucwords($arrReverse);} reverseStr("This is reversed haha");
$str = "the quick brown fox"; function reverse_and_capitalize($string) { $array = explode(" ", $string); $reversearray = array_reverse($array); $newstring = implode(" ", $reversearray); $capitalnewstring = ucwords($newstring); echo $capitalnewstring; } reverse_and_capitalize($str);
$words = explode(" ", $string); $new_str = join(array_reverse($words), " "); echo ucwords($new_str);} ?>
<?php $string = "the quick brown fox"; function reverse_cap($string){ $arr = explode(" ", $string); for($e = count($arr) - 1; $e >= 0; $e--){ print(ucfirst($arr[$e]) . " ") ; } } reverse_cap($string); ?>