PROGRAMMING COURSES ADMIN VIDEO TUTORIALS COMMUNITY RESOURCES |
There is an operator in PHP that is very similar in functionality to the
if statement called the ternary (?) conditional
operator. It evaluates to check if the first subexpression is
true, if it is it will return the value of the second subexpression, if
the first subexpression is false it will return the value of the third
subexpression.
Here is a code example using flavor variables and checking to see if the shop has our favorite flavor using ?: ![]() <?php
Sorry we do not have chocolate.
That concludes this section, to continue learning PHP head back to the index
|
|||||||||||
|
|
DevelopPHP Requires Flash Player
___________________________________________
|
||||||||