From the course: PHP for WordPress
What is PHP?
- [Narrator] PHP stands for PHP hypertext processor. It is a programming 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 "2." Since PHP has this ability, it's often used to do heavy lifting on websites. Pull information from databases, log into 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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is PHP?2m 1s
-
(Locked)
Printing information3m 15s
-
(Locked)
What are variables?6m
-
(Locked)
Strings in PHP5m 57s
-
(Locked)
Using arrays7m 59s
-
(Locked)
Arithmetic operators and math in PHP4m 38s
-
(Locked)
Challenge: Perform a mathematic operation and store it1m 14s
-
(Locked)
Solution: Perform a mathematic operation and store it3m 33s
-
-
-
-
-