Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise:( Fill a blank ) 1- Insert the missing part of the code below to output Hello World. ......... Hello World; 2- Write the correct

image text in transcribedimage text in transcribedimage text in transcribed

Exercise:( Fill a blank ) 1- Insert the missing part of the code below to output "Hello World. ......... "Hello World"; 2- Write the correct opening tag and close tag for PHP scripts. echo "This is PHP"; 3- Single-line comments in PHP can be written using two different prefixes, write one of them. ........ This is a single-line comment 4- Statements in PHP have to end with a special character, which one? echo "Hello World".... 5- Create a variable named txt and assign the value "Hello". 6- Create one variable named x, and one variable named y, then use the echo statement to output the sum of x and y. 5 = 7; .; 7- Get the length of the string "Hello World!". echo ("Hello World!"); 8- Reverse the string "Hello World!". echo ..("Hello World!"); 9- Replace the word "World" with the word "Dolly". $oldtxt = "Hello World!"; $newtxt = (........... ) 10- Divide 10 by 2, and output the result. echo 10 ... 2; 11- Use the correct comparison operator to check if $a is equal to $b. var_dump($a ....... $b); 12- Output "Hello World" if $a is greater than $b. $a = 50; $b = 10; { echo "Hello World"; } 13- Output "Yes" if $a is equal to $b, otherwise output "No". $a = 50; $b = 10; --($a == $b) { echo "Yes"; } ............. echo "No"; } 14- Print "1"ifa is equal to b, print "2" if a is greater than b, otherwise print "3". Output "1" if $a is equal to $b, print "2" if $a is greater than $b, otherwise output "No". $a = 50; $b = 10; $b) { echo "1"; } ($a > $b) { echo "2"; } { echo "3"; } 15- Create a switch statement that will output "Hello" if $color is "red", and "welcome" if $color is "green". ($a == ($color) { "red": echo "Hello"; break; "green": echo "Welcome"; break;} 16- Add a section that will output "Neither" if $color is neither "red" nor "green". switch ($color) { case "red": echo "Hello"; break; case "green": echo "Welcome"; break; echo "Neither"; }

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