Question: PHP Q1 Assume that the variable named $speed has a value stored in memory. Write an 'if' statement that will display using the echo statement
PHP
Q1
Assume that the variable named $speed has a value stored in memory. Write an 'if' statement that will display using the echostatement one of the following strings based upon the value of the variable $speed.
0 - 65 miles per hour: No fee
66 - 80 miles per hour: $172.99
81 - 95 miles per hour: $199.99
96 or more miles per hour: Go to Jail
QUESTION 2
The string variable $user_data stores email addresses separated by the semicolon (;) character (e.g. jsmith123@example.org;tpapa987@email.com;jkolas989@kctcs.com). Write the php statements to convert the string to an array named $email_addresses that contains the email addresses that make up the string. Then, display the contents of the array, one email address per line.
QUESTION 3
The string variable $email_address stores the string "email_id@kctcs.edu". Write the php statements that will extract, using string manipulation functions, the username and domain name from the string and display them in all upper case letters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
