For Mac users I will direct you to a great program called MAMP (Mac apache Mysql PHP) download and install that, the free version should be more than enough to start out, but if you find yourself needing more the paid version is great.
Windows users may have a little less pretty interface, but it still works! A program call WAMP (Windows Apache Mysql PHP) Just download and install.
I will be doing this tutorial on a Mac so everything will be in MAMP but everything is very similar in WAMP. For both, make sure that your server is up and running. To do this on MAMP click on the app (the one that looks like an elephant) it will ask for the admin password, then you will be connected a web page will open confirming it’s success. With WAMP click on the icon, it will place an icon in the bottom right bar by your time (the icon looks like a meter of some kind). Click on this icon and select start all services. For more information on how to use WAMP check this out WAMP Docs. Now that we have our servers running it’s time to get started with the fun stuff, Writing the PHP.
Bare Bones Basics
This section I will talk about the very basics needed to get your first PHP application going. If you have already seen php code before than you will recognize some things, but go ahead and read over the information because if you mess up these very essential pieces of the PHP picture than nothing you write in PHP will work. So pay attention and you will be fine.