box-o-sand/docroot/html/basics.php

36 lines
537 B
PHP
Raw Normal View History

2010-12-29 04:16:20 +00:00
<!DOCTYPE html>
<html>
<head>
<title>php basics</title>
</head>
<body>
<?php
$x = 25;
$y = 10;
$z = $x + $y;
?>
<p><?php printf("\$z=%s", $z); ?></p>
<?php $z = $x / $y; ?>
<p><?php printf("\$z=%s", $z); ?></p>
<?php $z = $y * $y * $x; ?>
<p><?php print $z - 1250; ?></p>
2010-12-29 04:18:20 +00:00
<p>
<?php
$string = "PHP is wonderful and great.";
$string = $string . " " . "All the cool kids are doing it.";
print $string;
?>
</p>
2010-12-29 04:16:20 +00:00
</body>
</html>