
Concept explainers
Write a PHP script in html that creates a variable $states with the value "Mississippi 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. Output the array $statesArray to the screen.

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

- Alert dont submit AI generated answer.arrow_forwardJava code pleasearrow_forwardAHPA #4: The C ATM Machine• Two people, "a" and "b", have checking and savings accounts.• Create a 2x2 array to hold their amounts: a – checking: $500, savings:$1,000; b – checking: $750, savings: $325.• Have the ATM machine ask the user their name.• Ask the user if they want to withdraw from their checking or their savingsaccount.• Use a switch statement to process different types of accounts.• Create software that will provide an ATM user with theproper change for any dollar amount up to $200.• Example: Run the code for $19, $55, and $200. Is the amount > $100, then provide a $100 bill & subtract $100• Is the amount >= $100, then provide a $100 bill & subtract $100• Is the amount > $20, then provide a $20 bill & subtract $20 [repeat 4times]• Is the amount > $10, then provide a $10 bill and subtract $10• Is the amount > $5, then provide a $5 bill and subtract $5• Provide the remaining amount in single $1 bills so the output should be like shown in…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





