Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed PHP Arrays and Control Structures!

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let's put together the skills you've learned in this course to add functionality to our todo app. We'll start by displaying either complete, incomplete, or all tasks. In doing so, we'll take a closer look at how some of the comparisons work in conditional statements and how to use a secondary array to access array elements.
Boolean Comparisons
In PHP, when a value comparison is made with one of the element being a boolean value, each element is evaluated as a boolean.
Comparing EQUAL VALUES (empty string equals false, but any other string equals true) ('all' == 'all') equals true (after type juggling) (false == 'all') equals false (after type juggling) (true == 'all') equals true (after type juggling) (false == '') equals true (after type juggling) (true == '') equals false (after type juggling)
Comparing IDENTICAL Values and of the same type. ('all' === 'all') equals true (false === 'all') equals false (true === 'all') equals false (false === '') equals false (true === '') equals false
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Alex Hort-Francis
12,924 PointsQuite a tortured example; you would use object-oriented programming for an application this complex!
1 Answer
-
devis
4,059 Points0 Answers
-
Aakash Srivastava
5,415 Points1 Answer
-
Sean Flanagan
33,236 Points0 Answers
-
Alex Bauer
9,426 PointsI can't seem to practice my PHP code in the workspace in Treehouse, what am I doing wrong?
Posted by Alex BauerAlex Bauer
9,426 Points1 Answer
-
Alex Forseth
8,017 PointsWhy does the $order array display a value of 5 when there 5 false's?
Posted by Alex ForsethAlex Forseth
8,017 Points1 Answer
-
Yousef Sayer
Front End Web Development Techdegree Student 5,190 Points2 Answers
-
emanelbaradei
11,395 Points2 Answers
-
vardan gupta
7,887 Points0 Answers
-
Danielle Evans
2,282 Points2 Answers
-
Obayanju Damilare
3,383 Points5 Answers
-
miguel catt
1,424 PointsCan somebody explain this to me? I'm getting confused
Posted by miguel cattmiguel catt
1,424 Points3 Answers
-
Darrell Conklin
Python Development Techdegree Student 22,377 Points0 Answers
-
John Lukacs
26,806 Points26 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up