too long

First things first, when I open and run XAMPP this shows up

enter image description here

The issue is, when I try and open a .php file it doesn't work it simply just shows the code WITHIN the php file, the php itself does not work.

I have downloaded and uninstalled XAMPP 3 times today.

Any ideas?

This is a rookie mistake, Make sure the URL says localhost/index.php and not file:///C:/...

You should just try reinstalling the operating system as well as xampp over again. My answer takes into consideration that you have already tried installing xampp three times. If you have a Mac just restart holding the command and r keys and then wait for the recovery center to come up. Then select reinstall osx. This requires internet. If you have windows there might be an install disk that came with the system and try reinstalling from the disk.

Problem is that port 80 is being used by some other application. If you have installed skype it would skype. We can manually change the port used by skype for that check the answer for this SO question How to solve WAMP and Skype conflict on Windows 7?

You can also make sure which appication is using port 80 by checking this SO question How to find which program is using port 80 in Windows?

To fix the problem you need to change xampp port from 80. Normaly 81 works just fine. Follow these steps to change the XAMPP server port number:

1) Stop the XAMPP server, if it is running already.

2) Open the file [XAMPP Installation Folder]/apache/conf/httpd.conf.

3) Search for: "Listen 80"

4) Change to (Example): "Listen 81"

5) Search : ServerName (Update this too)

6) Save

7) Restart XAMPP server and you are done.

Note: Now your url is: www.localhost:81