<?php function reverseWords($str) { return implode(' ', array_map('strrev', explode(' ', $str))); } echo reverseWords("this is a string"), PHP_EOL; echo reverseWords("this is a string");
You have javascript disabled. You will not be able to edit any code.