Thursday, 20 November 2014

What is PHP

What is PHP?
PHP is a server side scripting language and is used widely for making dynamic pages. PHP stands for “PHP Hypertext Processor” and its an open source scripting language. Developed by Rasmus Lerdorf in 1994. PHP scripts are run on server which means it is server-side language and its supported by major web servers like Apache, ISS and Nginx, making it a great tool to create beautiful dynamic web pages.

PHP Syntax

PHP script starts with <?php and ends with ?>and PHP file default extension is “.php”.

<?php
// PHP code
?>
Each statement ends with a semicolon and two basic statements used to Show the output text is echo and print.Comments in PHP
We can write comment in a line with two forward slashes or we can write comments in a block, syntax is shown below.
<html>
<body>
<?php
//Single line comment
/*
Multi line or Block Comment
*/
?>
</body>
</html>

No comments:

Post a Comment