codescracker
php

Getting Started with PHP



« Previous Tutorial Next Tutorial »

Here you will see how to get started in PHP programming, or how to program in PHP language.

How PHP Program can be Written ?

Let's take a simple program in PHP to see how PHP program can be writted.

<html>
<head>
   <title>Getting Started with PHP Programming - CodesCracker</title>
</head>
<body>
<?php 
   echo "<h2>Getting Started with PHP Programming</h2>";
   echo "<p>Let's get started with world class scripting language.</p>";
   echo "<p>Or let's get started with PHP programming.</p>";
?>
</body>
</html>

The above PHP code will produce the output given here:

getting started with php programming

Let's take another PHP simple example printing some paragraphs.

<html>
<head>
   <title>Getting Started with PHP - CodesCracker</title>
</head>
<body>
<?php 
   echo "<p>You can either use echo or print to ";
   echo "to output the text.</p>";
   echo "<p>Hello World</p>";
   print "<p>Hello World</p>";
?>
</body>
</html>

Here is the sample output produced by the above PHP code:

getting started with php

PHP Online Test


« Previous Tutorial Next Tutorial »



© Copyright 2021. All Rights Reserved.

CodesCracker