PHP Programs

PHP program to print hello world

It is first program of PHP, in this program text is print on screen (on web browser).

To print the text on screen echo is used.

Program

<html>

<head>

<title>Hello World</title>

<body>

    <?php

    echo"HEllo World!";

?>

</body>

</html>

When Run The Program Following Output:

HEllo World!

Description

In above program , 5th line identifies that everything beyond the <?php tag, until the ?> tag, is PHP code.

We use echo statement to print text on screen we need to pass text in double quotes

Ex:      echo"HEllo World!";

Releted Programs

© 2017 codewmAll rights reserved.