PHP Handwriting Manual Full Part1
PHP Handwriting Manual Full Part1
1. Introduction to PHP
• PHP files can contain text, HTML, CSS, JavaScript, and PHP code.
• PHP code is executed on the server, and the result is returned to the browser as plain
HTML.
• PHP can create, open, read, write, delete, and close files on the server.
3. Why PHP?
• PHP is compatible with almost all servers used today (Apache, IIS, etc.)
<?php
echo "Hello World!";
?>
5. PHP Comments
Single-line comments: // or #
Multi-line comments: /* */
Example:
<?php
// This is a single-line comment
# This is also a single-line comment
/* This is a
multi-line comment */
?>
6. PHP Variables
• Variables in PHP start with the $ sign, followed by the name of the variable.
• A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and
_)
Example: