Code
Code
Exercise #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon"
href="384550380_252097501182187_1267731472058973915_n.png">
<title>Exercise 2</title>
</head>
<body>
<h1>Calculation</h1>
<?php
$num1=10;
$num2=5;
$sum=$num1 * $num2;
?>
</body>
</html>
Exercise #3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=\, initial-scale=1.0">
<title>Excercise 3</title>
</head>
<body>
<?php
$a =50;
$b = 10;
?>
</body>
</html>
Exercise #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$num1 = 10;
$num2 = 5;
$result = $num1 * $num2;
</body>
</html>
Exercise #3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$t = date("H");
Exercise #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$num1 = 10;
$num2 = 5;
$result = $num1 * $num2;
</body>
</html>
Exercise #3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$t = date("H");
Exercise #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ACTIVITY 2</title>
</head>
<body>
<?php
$num1 = 10;
$num2 = 5;
Exercise #3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ACTIVITY 3</title>
</head>
<body>
<?php
$a = 50;
$b = 10;
Exercise #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
// Introduction
$greetings = "<h2>Good day! This is my first programming script.</h2>";
echo ($greetings);
if ($num2 == 0) {
echo("Division by zero is not valid!");
} else {
$result4 = $num1 - $num2;
echo("The result of " .$num1. " / " .$num2. " is " .$result3. ".<br><br>");
}
echo("This output is submitted by <h2>" .$name. "</h2> from section <h2>" .$section. "</h2>.")
?>
</body>
</html>
Exercise #3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
// Output "Hello for enjoy PHP programming!" if $a is greater than $b.
$a = 50;
$b = 10;
$introduction = "Variables use are " .$a. " and " .$b. ".";
?>
</body>
</html>
96