PHP program to exchange first and last characters in a string
I am trying do to this exercise: "Write a PHP program to exchange the first and last characters in a given string and return the new string." The thing I've tried to do is this: function stringReverse($str){ $newStr = array($str);…