Writing PHP
Writing PHP on your computer is actually very simple. You don’t need any specail software, except for a text editor (like Notepad in Windows). Run this and you are ready to write your first PHP script.
Structure of PHP program
PHP program must between < ?php and ……?> tags. Some programmer prefer to work like < ? ….?> you can use any of them.
How to print Text in PHP
One can print text using different command of PHP.
1) echo is used to print anything as an output for example if you write echo “how are you?”; (remember each statement must end with a semi column, which is called termination mark).
2) print is also used to print , one can use it same as echo command for example
< ?php print “Hello”; ?> will print “Hello “ as an output.
What is the difference between echo and print? Which is faster, echo or print?
There is a difference between the two, but speed-wise it should be irrelevant which one you use. print() behaves like a function in that you can do: $ret = print “Hello World”;And $ret will be 1 That means that print can be used as part of a more complex expression where echo cannot.


