You are to create a PHP program named states.php that creates a scalar value $states that will accept 5 state names from the user.
a. From the entered state names, you are to search for a word that ends in “xas” and store this word in element 0 of $statesArray.
b. Search for a word in the states entered that begins with k and ends in s. peform a case insensitive comparison and store this element in 1 of $statesArray.
c. Search for a word that begins with M . Store this element in element 2 of the array.
d. Order the states entered and place the new order in elements 2 – 7 of the $statesArray.
e. Print out the data to screen.
f. You are to use a do/while and if to accomplish the above tasks
g. Create and use a function to accomplish one of the above tasks.
This was modified from another assignment on the internet (modified in a bad way from my point of view, the other one already had the states listed)
How am I supposed to do this? Any guidance would be greatly appreciated. I do not even know where to start....the instructions aren't helping much.