Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem - Write a PHP script in html that creates a variable $states with the value Mississippi Alabama Texas Massachusetts Kansas. The script should perform

Problem -

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago