Labwork # 1 A1 Print the following statement to the browser: "Hello, home home sweet home." Next, create two variables, one for the word "Hello" and one for the word "home". Print the statement to the browser again but this time substitute the relevant words with your variables. Remember to include the tag to show your statements on different lines.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PHP PROGRAMMİNG

 

Labwork # 1
wwww
A1
Print the following statement to the browser:
"Hello, home home sweet home."
Next, create two variables, one for the word "Hello" and one for the word "home". Print the statement
to the browser again but this time substitute the relevant words with your variables. Remember to
include the <br/> tag to show your statements on different lines.
A1.2
In your script, create the following variables:
$a=8;
$b=6;
$c=5;
Write a php script to print out the following:
Delta= -124 where the solution calculated using 6?-4*8*5
Formula: b'-4*a*c
When the values of variables change your output should change accordingly.
A1.3
For this PHP exercise, write a script using the following variables:
$a="Around";
$d=80;
Using single quotes (' '), the concatenation operator, the variables created, and a single echo statement,
echo the following to the browser. When the values of variables change your output should change
accordingly.
Around The World in 80 Days.
A1.4
Find and correct the errors for the PHP script below.
<?php
Școlor="red";
echo "My car is $Color <br/>":
echo "My car is $color <br/>"
echo "My car is $coLor <br/>":
?>
Transcribed Image Text:Labwork # 1 wwww A1 Print the following statement to the browser: "Hello, home home sweet home." Next, create two variables, one for the word "Hello" and one for the word "home". Print the statement to the browser again but this time substitute the relevant words with your variables. Remember to include the <br/> tag to show your statements on different lines. A1.2 In your script, create the following variables: $a=8; $b=6; $c=5; Write a php script to print out the following: Delta= -124 where the solution calculated using 6?-4*8*5 Formula: b'-4*a*c When the values of variables change your output should change accordingly. A1.3 For this PHP exercise, write a script using the following variables: $a="Around"; $d=80; Using single quotes (' '), the concatenation operator, the variables created, and a single echo statement, echo the following to the browser. When the values of variables change your output should change accordingly. Around The World in 80 Days. A1.4 Find and correct the errors for the PHP script below. <?php Școlor="red"; echo "My car is $Color <br/>": echo "My car is $color <br/>" echo "My car is $coLor <br/>": ?>
A1.5
Try the following PHP script.
<!DOCTYPE html>
<html lang="en">
<head>
<title> Hello </title>
</head>
<body>
<h1>
<?php
ScurrentTime = date( "g:i:s a" );
echo "Hello, world! The current time is $currentTime";
www
?></h1>
</body>
</html>
Transcribed Image Text:A1.5 Try the following PHP script. <!DOCTYPE html> <html lang="en"> <head> <title> Hello </title> </head> <body> <h1> <?php ScurrentTime = date( "g:i:s a" ); echo "Hello, world! The current time is $currentTime"; www ?></h1> </body> </html>
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education