Is PHP properly installed

I Installed LAMP on Ubuntu according to instructions in this page Installing LAMP On Ubuntu For Newbies | HowtoForge - Linux Howtos and Tutorials ,
but now if I create any page in php under /var/www, and use address http://localhost...etc
all I get to see is a blank page,even if the page contains only a simple echo statement.
I can view html files, but not php files linked from those html files, so I guess apache must be properly working.

Did you look in your apache2 and PHP error log files?

why don't you try to re install with any server..

Make sure that php is installed properly use php -v on your termianl,like this

akshay@Aix:~/Desktop$ php -v
PHP 5.5.9 (cli) (built: Feb 23 2014 03:00:50) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

akshay@Aix:~/Deskto$ php -r 'echo phpinfo();' | head -5
phpinfo()
PHP Version => 5.5.9

System => Linux Aix 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 i686
Build Date => Feb 23 2014 02:56:19