1.U just create a php program in a text editor like notepad.
2.Save ur program in htdocs folder in apache2.2 with the extension '.php'.
3. For example if ur file name is ex.php, then type as "http://localhost/ex.php" in the address bar of your browser and press enter. u will find the output there!