hi all,
This time we are going to write our first web page using PHP scripting language. We can use notepad or wordpad for write our codes.Whatever you use, it's very easy to handle if it is simple text editor.
In HTML language we use,
<html>......</html> tags to define that this is a html document. Like html we use,
or you can use,
hope to see you in next part
This time we are going to write our first web page using PHP scripting language. We can use notepad or wordpad for write our codes.Whatever you use, it's very easy to handle if it is simple text editor.
In HTML language we use,
<html>......</html> tags to define that this is a html document. Like html we use,
<? php
?>
tags for define a php. <?php tag starts the php part and ?> tag finish the php part.Print a Sentence or a word
<?php
echo "Hello PHP !";
?>
or you can use,
<?php
print "Hello PHP !";
?>
Above both are correct. It gives the same result by printing Hello World ! in the browser.
We use semicolon (;) to notify to computer that the statement is end here. Hence we began new statement. Keep it on your mind. Try some words, sentences using echo keyword. Often programmers use echo instead of print keyword.
Comments in PHP
Comments are very important in any languages. It clearly organize our codes. It will help us to read codes without having any confuse. We use // (double forward slash) for single line comment and /*comment*/ for multi-line line comments.
<?php
// This is a single line comment
?>
<?php
/* This is
a multi-line
comment */
?>
hope to see you in next part
Enjoy !