PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft’s ASP. Personally, I mastered the whole language in just 2 days. Its that simple!
Php required Php and Apache to run. There are many server packages available that makes life a whole lot easier than having to install Php, Apache and MySQL individually on your machine. For Windows users, we recommend using EasyPhp. For Mac users, we recommend using MAMP
Go to easyphp.org to download the latest version of EasyPhp. Follow the onscreen instructions to install and run the server.
Go to mamp.info to download the latest version of MAMP. Follow the onscreen instructions to install and run the server
In this tutorial, we assume you’re using Mac and MAMP is actively running. Go to the htdocs folder and create a new file called hello.php. Add these codes in the new file.
Run your code
Open you code, and simply type http://localhost/hello.php in the address bar. That’s it!