PHP showing as text apache

After install php and apache in a machine,sometimes we see that php shows as plain text in web browser.Suppose we echo as text like “echo ‘hello world’;”.When we access this file on web browser we see that it’s not print hello world,it shows the full line as a plain text.It happens for a php module is not loaded.That module is a2enmod.For that we need to load this module in php server.In below i suggested some command to run in terminal to load that module.If we run those command on terminal it will solve.I mean php run perfectly not as plain text