subject

Write a PHP script named states. php that creates a variable $states with the value "Mis- sissippi Alabama Texas Massachusetts Kansas". The script should perform the following tasks: a) Search for a word in $states that ends in xas. Store this word in element 0 of an array named $statesArray.
b) Search for a word in $states that begins with k and ends in s. Perform a case-insensitive comparison. Store this word in element 1 of $statesArray.
c) Search for a word in $states that begins with M and ends in s. Store this element in element 2 of the array.
d) Search for a word in $states that ends in a. Store this word in element 3 of the array.
e) Search for a word in $states at the beginning of the string that starts with M. Store this word in element 4 of the array.
f) Output the array $statesArray to the screen.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
You know the right answer?
Write a PHP script named states. php that creates a variable $states with the value "Mis- sissippi A...
Questions
question
Mathematics, 05.05.2020 05:36
question
Biology, 05.05.2020 05:36
question
Mathematics, 05.05.2020 05:37
question
History, 05.05.2020 05:37
question
Mathematics, 05.05.2020 05:37
question
Mathematics, 05.05.2020 05:37
Questions on the website: 13722363