From the course: PHP for WordPress
What is PHP?
- [Instructor] PHP stands for PHP hyper text processor, it is a programing language as opposed to HTML which is a markup language. The main difference between HTML and PHP is that HTML structures data on a page. PHP allows you to apply logic and perform interactive tasks based on a set of criteria. HTML, CSS and JavaScript are all client side languages, meaning our computers specifically, a web browser does all the processing. Conversely, PHP is a server side language, meaning our server or remote computer does all of the work then sends the end result to our browsers. You can imagine the process like a translator. The server translates the PHP into a language our browsers can understand. As an example, in PHP the code would look like this. However, in the browser we would just see two. Since PHP has this ability it's often used to do heavy lifting on websites, pull information from databases, log in to secure areas, run calculations and display dynamic data. In the context of WordPress, PHP is what grabs all of the content from the database and displays it on the screen for your users. It's also the driving force behind the dashboard. Any time you're adding, removing or modifying something, PHP code is being run. That means if you want to write a custom template or create a custom plug-in you'll need PHP. Specifically, there are a few key areas you should know. Input and output, variables, controlling the flow of your code, associating data with arrays and generalizing your code. You'll learn all of that and more starting with basic output.
Contents
-
-
-
What is PHP?2m 1s
-
(Locked)
Printing information3m 15s
-
(Locked)
What are variables?6m
-
(Locked)
Strings in PHP5m 57s
-
(Locked)
Using arrays7m 59s
-
Arithmetic operators and math in PHP6m 18s
-
(Locked)
Challenge: Perform mathematical operations and store it1m 41s
-
(Locked)
Solution: Perform mathematical operations and store it4m 25s
-
-
-
-
-