-
Write a PHP function to sort an array of strings by their length, in ascending order. (Hint: You can use the usort() function to define a custom sorting function.)
-
Write a PHP function to concatenate two strings, but with the second string starting from the end of the first string.
-
Write a PHP function to remove the first and last element from an array and return the remaining elements as a new array.
-
Write a PHP function to check if a string contains only letters and whitespace.
-
Write a PHP function to find the second largest number in an array of numbers.
To complete the assignment, create a PHP file and write the code for each of the above functions. You should also include example usage for each function, to show that it is working correctly.