PHP Tutorial

PHP Syntax

PHP Syntax

Every PHP program has rules for how statements are written and executed.

  • Follow PHP syntax rules for statements and blocks
  • Use comments to document code
  • Run examples in the Try it editor

Example

$name = "Sturdee";
echo $name;
Try it Yourself
Run this PHP example in your local environment or course sandbox.