PHP Tutorial

PHP is a general-purpose server-side scripting language that is used to create dynamic and interactive web pages quickly.

Required Knowledge

Before you begin this PHP tutorial, it is necessary that you have a basic understanding and experience of the following:

  • HTML - PHP can be written with HTML, so it's essential.
  • Basic programming knowledge - If you have any traditional programming experience like C, then learning PHP will be very easy for you.

PHP Example

A quick look at the example of PHP script and detailed description is given in the PHP Syntax page.

<!DOCTYPE html>
<html>
<head>
   <title>PHP Script Example</title>
</head>
<body>

<?php
   echo "Hello world, I'm a PHP script!"
?>

</body>
</html>

Click on the Run button to see how it works.

Program Output:
Hello world, I'm a PHP script!

The above PHP example is written with HTML, and it has been used to print text on the web browser.



Courses
Share If You Like

Subscribe Updates via Email

Join 49,000+ W3schools lovers and get all the latest tutorials, programs, algorithms in your inbox.