Saturday, July 5, 2008

PHP - Basics -Part -1

1.Getting Started with PHP:

?php
//Echo Command is used in same context as Print statement
echo "Print me \n";
?>

The above lines will print "Print me" in the browser.

2.Comments in PHP:

a. Single line comments enclosed winthin // Your Comment //
?php
//Single line Comment//
echo "Single line Comment";
?>

b.Mulitline comments can be enclosed within /* Your comment */
?php
/* Comment starts here we are now talking about mulitple line comment.The comment ends here.*/
echo "Multiline comments";
?>

No comments: