Your First Php Program Posted By - Ko Ko - May 19, 2006Summary : Here I will tell you how to write your very first PHP program
Your First Php Program
Before writing our very first Php program a short explanation about Php tags will be needed. Php code can be freely mixed with html codes. When html code ends and php code started you have to type in the "php start tag". Also when the php code ends and html code started again, the "php end tag" have to be type in again. Various pairs of "php start tag" and "php end tag" are shown below:-
See below how these 4 pairs of Php Tag are used:-
Open MS Notepad and type the code shown below. Observe carefully how the start and end tags were used.
In the address box type in http://localhost/hello.php and click enter. If you have done everything properly, you will see "Hello World!" as shown below.
Congratulation, you have written your first php program successfully. |