All php code must be between two sets of tags
<?php
echo 'somecode here';
? >
The semicolon signifies the end of a PHP statement and should never be forgotten.
Coding with php all you need is a text editor and start learning.
One of the best ways to learn is to practice and practice.
Get yourself a Php book for learning php.
While we only can give you a small taste for it, you really should start with a book or even go to school for it.