PHP is a popularly used open source scripting language for website development. It is an abbreviation for
Hypertext Pre-Processing derived from its previous version called
Personal Home Page Tools.
Programming languages like python, java, C+, etc. are executed on your own computer but PHP is executed on a web server, a web space, and the final output is sent to your browser. A software called Wampserver is developed to save the high cost of web hosting required to test php codes on PC. It is compatible and works perfectly in every type of web browsers.
Some biggest names in world wide web like Facebook and CMS (Content Management System) like WordPress use PHP to execute. So, learning to code in php is essential to become a good developer and blogger. It will be necessary for you to learn php, maybe today or tomorrow.
Using php, you can perform the following tasks:
- Create a forum
- Develop login pages for users
- Gather user information, cookies and data from a form
- Display plain HTML, CSS, images, PDF, surveys, etc.
PHP is for absolute beginners and no programming experience is required. Anyone can easily learn php. However, knowledge of HTML and CSS will be required for advanced study in future. But for now, you don’t require any of those.
How to assign variables in php?
Variables are like storage devices in your php program for storing values.
Let us consider that, you have balls and gloves. But you don’t have enough storage in your bag. So you hand up balls to man and gloves to woman. You also have a weak memory. So you give them following names:
Here man_balls and woman_gloves are two variables. Let us consider the value of balls is 5 and value of gloves is 10. So it will be written as follows:
- man_balls = 5
- woman_gloves = 10
The equal sign “=” is known as operator and it is different from original mathematics. In above examples, variable (man_balls or woman_gloves) comes first followed by operator and ended in value.
However, the above two examples of assigning variables are not correct. The dollar sign “$” at start and semicolon “;” is missing. The program will refuse to execute if you make such mistakes. So the correct way of assigning variables would be:
- $man_balls = 5;
- $woman_gloves =10;
In this way, we can assign variables in php. In future, I will be posting about syntax used in php and more. Please leave a comment below to share your feedbacka>
94% discount on PHP book
Now we have an special offer for all beginners who want to learn complete basic skills on php programming. We are giving a discount of 94% on a highly sold amazon book that originally costs $19.38 for just $1.11 (USD). This book contains everything for beginners and advanced php learners. This is a highly sold book on amazon and it is available for limited offer only. Grab it now before someone else does only available through the link below:
Offer: Buy PHP Programming Course worth $19.38 For just $1.1 only (Limited Sale)