To do work with PHP first of all you have toInstal PHP .if you have no server supports PHP. But If your server supports PHP then you have no need to do anything.
Just create a PHP file Like: example.php in htdocs or in your web directory then save and finally write on browser:http://localhost/eexample.php then Go.
If you have no server supports PHP you have to Instal PHP first . you can Instal PHP From
the several following links:
How to install PHP5 from PHP.net : http://www.php.net/manual/en/install.php
Free download PHP
Free download Apache
free download MySQL
PHP Coding Syntax:
PHP script all time starts with <?php and ends with ?>.
and PHP script can be placed anywhere in the document.
Basic PHP Syntax:
Content have to write here.
.php extension must have in a PHP file.
PHP file generally contains HTML tags and some PHP scripting code.
Example of PHP code:
echo “Well come to PHP Tutorials”;
Normally two basic statements are used to show the output text in PHP:
1. echo and
In the above example we have used the echo statement to show the output the text “Well come to PHP Tutorials“. rather than print.
Every statement or code line in PHP must end with a semicolon.
In PHP generally we use // symbol to denote a one-line comment and
/* and */ symbol to make a block comment :
//This is a single-line comment