What is PHP?
And why should I learn to use and where would I begin once I decide to use it? To start, PHP stands for ‘PHP: Hypertext Preprocessor’, and it is one of the most common server-side languages in programming today. The reason it is so popular is the fact that it is completely open sourced, which means anyone with access to the internet, is free to complete access to everything PHP has available to them.
There are obvious reasons why a programmer should, and would, want to learn this language on that basis alone. Not only is it a programming skill you can use and implement free of cost, but there are a vast number of employers who incorporate this language on that basis alone. With the ease that it can be embedded into HTML, it won’t be long before you start seeing professional web development come to life in front of your very eyes.
Now that you have PHP successfully installed, we need somewhere we can actually write the code. I use Visual Studio Code. Once it is downloaded and installed, it is as simple as saving a blank notepad document, but instead of saving it with a ‘.txt’ extension at the end of the file name, use a ‘.php’. Now when you right click on that file and go to ‘Open With’, select Visual Studio Code, and it will open up to you a blank template to use. In order to write PHP code, it needs to be within PHP tags. The starting tag looks like ‘’. Anything in between these tags will be read as PHP code.
Now that we have PHP installed, and a place to write our code, the next thing we will need is a software that will allow us to run the code so we can see our work come to life. I use Xampp. Once it is downloaded there are some slight modifications needed to make it run, but not that many. If you don’t alter any of the steps in the Xampp installation process, Xampp will be saved within your C:\ (Local Disk C:) file path on your computer. If we go there and click on Xampp, it will open into many different options. Now it is the ‘htdocs’ folder where you will want to save all your projects of work. For example, go inside the htdocs folder and save an empty document called ‘hello-world.php’. Now find where Xampp is on your computer and run it. You will get a pop-up that looks as follows except you won’t have any messages displayed yet I am sure.
Hope you liked the article.
This article is shared by www.script.biz | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.