Php is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.
- PHP stands for PHP: Hypertext Preprocessor
- PHP is a server-side scripting language, like ASP
- PHP scripts are executed on the server
- PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
- PHP is an open source software (OSS)
- PHP is free to download and use
Basic PHP Syntax
A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.
A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code.
Below, we have an example of a simple PHP script which sends the text “Hello World” to the browser:
Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.
There are two basic statements to output text with PHP: echo and print. In the example above we have used the echo statement to output the text “This is my first php”.
<html>
<body><?php
echo “This is my first php”;
?></body>
</html>
Comments in PHP
In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
I like use php for make website.
<html>
<body><?php
//This is a comment/*
This is
a comment
block
*/
?></body>
</html>
For know more about what is php and the php’s function can see more detail at www.php.net
Hope this website can help for everyone.
Hi, this is a comment.
To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.