今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Perform a mathematic operation and store it - PHP教程
课程: PHP for WordPress (2020)
Solution: Perform a mathematic operation and store it
(bright music) - [Instructor] All right, let's walk through the solutions. The first thing we're going to do is create an array called results. We'll just make it blank for now. The nice thing about arrays is that you can define them as blank, and then, just add new entries to them and I'll show you exactly how to do that. So the first arithmetic operator is nine plus two times five minus 11. So we'll type results, and then, we can do this assignment one of two ways. We can just leave the brackets empty, which will give it a numeric index or we can add a string inside of it, like A, since it was labeled as A on the challenge slide, and then, it would be an associate of array where it has a string index. Let's just stick with the numeric indexes for now, and then, we will do the assignment. That's nine plus, I want to do, in parenthesis, two times five, to make it explicit, minus 11. Now this should give us the…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
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 秒
-
-
-
-
-