From the course: PHP for WordPress
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Printing information
- [Instructor] The most common task you'll be performing in PHP as it pertains to WordPress is printing stuff on the screen. After all, WordPress is about displaying content. The first thing you should know is every PHP program begins with an opening PHP tag and ends with a closing PHP tag. The opening PHP tag starts with the less than sign, a question mark, and then the letters PHP. The closing PHP tag is just the question mark and then the greater than sign. This tells the server to process everything in between these tags. You can think of this like the opening and closing HTML tags. As it turns out, PHP acts as an extension or companion to HTML. It enables HTML to do things that it can't do on its own, interactive tasks, where HTML strictly handles the markup of a page, that is a description of what each element is and a basic notion of how it looks, PHP generates dynamic data for a webpage to be displayed. It can also do things like process forms and other input. PHP code and…
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
-
-
-
-
-