Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective : This week assignment is designed to familiarize yourself with the PHP language. Hint : In addition to the online OReillys book which is

Objective: This week assignment is designed to familiarize yourself with the PHP language.

Hint: In addition to the online OReillys book which is our main reference for PHP, you could use any online resources including w3schools: https://www.w3schools.com/php/

Create a new project (yourlastname_php) inside the htdocs folder inside XAMPP directory on your drive, inside this project will be all your files. Remember all projects you will create in this class need to be inside htdocs.

As a reminder, to access your work, you need:

Open XAMPP control panel and start all servers. Make sure to keep XAMPP running in the background.

open your browser and type in the URL bar:

http://localhost/khasawneh_php

(your project name would be different)

Since we havent yet created any files inside our new directory, you will not be able see any files.

From this point on, you should know how to create projects and files and the above instructions will not appear in future assignments.

Part 1 (5 points)

write a script to assign Walsh to a variable and Cavaliers to another variable.

Display both variables as Walsh Cavaliers - all on one line.

Display Walsh and Cavaliers on separate lines.

Part 2 (5 points)

Write a PHP script that performs calculations and prints the values to the screen in sentence form. No hard-coding of values!

Data and Sentence output:

The distance between Canton and Columbus is 138 miles. I paid $1.98 per gallon of gas and it took 5 gallons for my trip. The total cost of the trip was $9.90 and I averaged 27.6 miles per gallon.

NOTE: Add comments and TITLE

Part 3 (10 points)

Write echo statements that print exactly the following lines

This is a single quote

This is double quotes

This is a slash \

This is 2 slashes \\

A single quote followed by a double quote like .

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago