<!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <!-- Examples from CS 328 - Week 10 Lecture 1 - 2026-03-30 by: Sharon Tuttle last modified: 2026-04-01 you can run this using the URL: https://nrs-projects.humboldt.edu/~st10/s26cs328/328lect10-1/328lect10-1.php --> <head> <title> CS 328 - Week 10 Lecture 1 Examples </title> <meta charset="utf-8" /> <?php /* turning on error messages to the browser for THIS PHP document */ ini_set('display_errors', 1); error_reporting(E_ALL); /* make the function square available in this document */ require_once("square.php"); ?> <link href="https://nrs-projects.humboldt.edu/~st10/styles/normalize.css" type="text/css" rel="stylesheet" /> </head> <body> <!-- demo of PHP concatenation operator --> <p> <?= "a" . 'b' . "c" ?> </p> <!-- demo of variable interpolation in PHP (you get it for a variable within double quotes, you DON't get it for a variab le within single quotes) --> <?php $looky = 13; ?> <p> <?= "What is this: $looky" ?> </p> <p> <?= 'What is this: $looky' ?> </p> <!-- can use { } around a variable in a double-quoted string when you want to surround it with non-space characters to make it clear when the variable name ends --> <p> <?= "hey{$looky}txt" ?> </p> <p> Calling a function I included (using require_once) in the head element: <?= square(15) ?> </p> <footer> <hr /> <p> Validate by pasting .xhtml copy's URL into<br /> <a href="https://validator.w3.org/nu"> https://validator.w3.org/nu </a> or <a href="https://html5.validator.nu/"> https://html5.validator.nu/ </a> </p> </footer> </body> </html>