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.
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
What is PHP?2 分钟 1 秒
-
(已锁定)
Printing information3 分钟 15 秒
-
(已锁定)
What are variables?6 分钟
-
(已锁定)
Strings in PHP5 分钟 57 秒
-
(已锁定)
Using arrays7 分钟 59 秒
-
(已锁定)
Arithmetic operators and math in PHP4 分钟 38 秒
-
(已锁定)
Challenge: Perform a mathematic operation and store it1 分钟 14 秒
-
(已锁定)
Solution: Perform a mathematic operation and store it3 分钟 33 秒
-
-
-
-
-