saftutorials.com
PHP Syntax Tutorial

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>
Find us on

Facebook Google Plus Twitter Pinterest YouTube

web statistic