In this topic i will explain about php sysntax in details there are many whay and many type php sysntax like default and and with html and more about php syntax the below list are types of php syntax we covered in this topic.
Default Syntax
Short Open Tags
HTML Script Tags
ASP Style Tags
The default syntax starts with "<?php" and ends with "?>", generally most of used this syntax start with <?php and end with ?> tag in php syntax the following basic syntax example.
<?php
Your Code Here
?>
<?php
echo "This is Default Example";
?>
The short tags starts with "<?" and ends with "?>". Short style tags are only available when they are enabled in php.ini configuration file on servers.
<?
Your Code Here
?>
<?
echo "This is Short Open Tags Example";
?>
Write php script using html script tag.you can used <script language="php"> tag and write your code.
<script language="php">
Your Code Here
</script>
<script language="php">
echo "This is HTML Script Example";
</script>
The ASP style tags starts with "<%" and ends with "%>". ASP style tags are only available when they are enabled in php.ini configuration file on servers.
<%
your code here
%>
<%
echo"This is a ASP Style Syntax";
%>
>
<?php
echo "Company Name : Veewom Technology";
echo "Address : Bhavnagar,Gujarat,India 364001";
echo "Phone : 012584754";
echo "About : Veewom Technology is Web Development Company
?>
Company Name : Veewom Technology
Address : Bhavnagar,Gujarat,India 364001
Phone : 012584754
About : Veewom Technology is Web Development Company