🐘 PHP Syntax
PHP scripts start with <?php
and end with ?>
. Code inside runs on the server and outputs HTML to the browser.
📝 Example: Basic PHP Script
Output will appear here...
📖 Key Syntax Rules
- Statements end with a semicolon
;
.
- Use
echo
to output text or variables.
- PHP code must be wrapped in
<?php ?>
tags inside an HTML file.
💡 Tip: You can mix HTML and PHP on the same page for dynamic content.