PHP HOME
PHP Introduction
PHP SETUP
PHP Syntax
PHP Data Types
PHP Outputs
PHP Variable
PHP Constant
PHP Strings
PHP Operators
PHP if else if
PHP Switch
PHP while loop
PHP for loop
PHP Arrays
PHP Functions
PHP Sorting Array
PHP Form Handling
PHP Form Validation
PHP Form Required
PHP Form URL/EMAIL
PHP Form Submit
PHP Contact Form
PHP DATE & TIME
PHP INCLUDE
PHP FILE HANDLING
PHP FILE OPEN/READ
PHP FILE CREATE/WRITE
PHP FILE UPLOAD
PHP SESSION
PHP COOKIES
PHP FILTER
PHP ERROR HANDLING
PHP EXCEPTION
PHP Redirects
PHP with MySQL
PHP WITH MYSQL DB
MYSQL CONNECT
MYSQL CREATE DATABASE
SELECT DATABASE
MYSQL CREATE TABLE
MYSQL INSERT DATA
MYSQL SELECT DATA
MYSQL UPDATE DATA
MYSQL DELETE DATA
MYSQL ORDER
MYSQL LIMIT
MYSQL LAST ID
This chapter will teach you about basic of PHP syntax.
Most commonly used PHP canonical tags
<?php ..... ?>
There are also some other PHP open tags
<? .... ?>
<script language="php"> ......... </script>
What is PHP Syntax? <?php ... ?> is commonly used PHP Syntax.
There are also some other PHP open tags <? .... ?> or <script language="php"> ......... </script>
PHP codes can be anywhere in the document within PHP open and close tags
<?php
// PHP code should be within open and close tags of PHP
?>
Default file extension of PHP file is .php
What is default file extension of PHP?
.php is the default file extention of PHP
PHP file can contain HTML tags, text, CSS, PHP script and JavaScript see example.
<html>
<head>
<title>Hello John</title>
</head>
<style>
CSS code should be here
</style>
<body>
<?php echo "Hello, John!";?>
</body>
<script>
JavaScript code should be here
</script>
</html>