Introduction to PHP 7/13
Arithmetic
In addition to outputting strings, PHP can also do math.
<?php
echo 5 * 7;
?>
Here we use
echo
to multiply 5 and 7, and we end our line of code with a semicolon. PHP will output 35
.
Instructions
On line 8 in between the
<?php
and ?>
, useecho
to calculate 17 * 123
. Make sure to end your PHP code with a semicolon.<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
<?php
echo 17*123
?>
</p>
</body>
</html>
Comments
Post a Comment