What is PHP? Learn with me!

While HTML is a client-side language, PHP is a server-side scripting language. PHP earlier was known as Personal Home Page however, it is today, widely known as “Hypertext Pre-processor”

Why learn PHP?

As PHP is native to the web, you’ll be able to put simple projects online a lot quicker and with less difficulty, than you would be able to with some other languages, meaning you will see results for your efforts much quicker than if you were to learn another language.

Through this blog, I will be sharing with you my PHP learning journey. I am hopeful, that this will help others to learn as well.

Step 1 – To learn PHP language, you will have to configure a local development environment. Upon searching online, you will find many local development environment tools. These may be different for windows and MAC users. In my case, I am using XAMPP.

Step 2 – Download a code editor. Great if you already have one.

Step 3 – Create a new project.

How do you start writing PHP?

PHP code is embedded in HTML with tags <?php ?> There are however multiple ways to write PHP tag – <? ?>, <?= ?, <% %>. <? php ?> however is a universal command.

Always remember to us “;” to complete the command.

Using dynamic data: For how to have a element made available in all the pages without needing to added manually. Set a title – $tite = “Ratan Oberoi Official Site”; and to use to title in any page here is a example

What are comments and how to create – Comment is a message a reference for you and for others.

Types of comments: // example for only one line comments, /* example for multiple line comment */