How To Print Hello World in PHP

Step by step php Tutorials

Getting started Php example of each program with explanations

In this tutorials you will learn how to print hello world in php website width notepad php is a Hypertext Preprocessor scripting language ( personal home page ) php is a server site scripting language like asp or js it is use for making a dynamic website it provide a user interface to user it a very friendly language for users fast speed excavation loselly couples

“ PHP is the latest incarnation of php ( php :hypertext preprocessor ) – programming language devised by Ramus Lerdorf in 1994 for building dynamic ,interactive web sites. “

– Dave w. Mercer

“ PHP officially stand for ‘ PHP :Hypertext Preprocessor , ’ but it’s a also still known around the world by original name, Personal Home Page . it’s a server side programming that’s taken the web world by storm – PHP is a far and away the most popular programming language for use on web server. “

– Steven Holzner

PHP Tutorials Lesson 1:

Creating a first PHP page

How To Print Hello World in PHP Here’s where the action start – creating some PHP. This is where yor web application from guest book to a professional database lookup application, from interactive games to shopping carts – start.

This first PHP page will be a very simple one. You can start page with the special markup that indicates you about start using PHP, and that markup Look like this

<?php

.....

.....

.....

?>

Okay, so far we told the PHP engine on the server that we want to insert some PHP

code into a page. Now let’s do just that, adding these lines

<?php

phpinfo()

?>

 

This is called a PHP function Phpinfo(). A function is a grouping of PHP code that is addressable using single name such as php info. PHP function are define in Next Post

Print Some Text With HTML

Alright how about print some text using PHP ? you already seen that you can put text into your PHP file as you would HTML page, as here where you put a <h1> header as some into a page

<html>

<head>

<title> Learn PHP with TechnoRishi

</title>

</head>

<body>

<h1>

Here you learn PHP tutorials with TecnhnoRishi.in

</h1>

Here is ypur PHP Info :

.....

.....

.....

 

<html>

<head>

<title> Learn PHP with TechnoRishi

</title>

</head>

<body>

<h1>

Here you learn PHP tutorials with TecnhnoRishi.in

</h1>

Here is ypur PHP Info :

.....

.....

.....

 

That fine but obvisly, that also static. The displayed text is not going to change, no matter what’s going on in the code part of your page , and that;s clearly unacceptable. What if you wanted display the result of database lookup, or ticket reservation ?

You need to be able to insert text into a page using PHP as well, and you can do that using the PHP echo statement. For example, echo the Text “Welcome To TechnoRishi “ to the web page sent back to the browser , you could add Following lines of code to a page, printtext.php :

<html>

<head>

<title>

Yo Can Learn a PHP tutorials on Technorishi it’s a good and easy

</title>

</head>

<h1>

PHP esy to learn

</h1>

Here what you say :

<br>

<br>

<?php

Echo “Hello World! “

?>

</body>

</html>

 

Take a look at this page, printtext.php, in your browser now,

Leave a Reply

Your email address will not be published. Required fields are marked *