You are here: PHP Tutorial

PHP is a server scripting language, widely-used free and a powerful tool for making dynamic and interactive Web pages.

PHP is a efficient alternative to competitors such as Microsoft's ASP.

PHP files can contain text, HTML, CSS, JavaScript, and PHP code
PHP code are executed on the server, and the result is returned to the browser as plain HTML
PHP files have extension ".php"


A PHP script can be placed anywhere in the document starts with <?php and ends with ?>:

<?php
//PHP code goes here
?>

 

A PHP file normally contains HTML tags, and some PHP scripting code.

Below, a example of simple PHP file, with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on a web page:

<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>

Blog

Active User (0)

No Active User!
 Log In to Chat