adobe photoshop cs4 PHP4 practical application experience 6

WBOY
Release: 2016-07-30 13:29:24
Original
1437 people have browsed it

Author: Sun Movement
Now, you have understood that PHP allows you to nest conditional statements. However, if you look at the example used to demonstrate this concept you will agree that it is both complex and scary.
------------------------------------------------- -------------------------------
< ?
if ($day == "Thursday")
{
if ($time == "12")
                                                                                                    }
}
?>
------- -------------------------------------------------- -----------------------
 Fortunately, in addition to the comparison operators that we can already use without any restrictions, PHP also provides some logical operations The operator allows you to group conditional statement descriptions together. The table below shows this clearly:
Assume $delta = 12 and $omega = 9
Operator
Meaning
Example
Result
&&
AND
$delta == $gamma && $delta > $omega
True
$delta && $omega < $omega
False
||
OR
$delta == $gamma || $delta < $omega
True
$delta > $gamma || $delta < $omega
False
!
NOT
!$delta
False
< =
less than or equal to
$delta < = $omega
False
 Okay, we can rewrite the code of the above example using logical operators. You see, the following expression Is it simpler?
------------------------------------------------- -------------------------------
< ?
if ($day == "Thursday" && $time == "12" && $place == "Italy")
                                                                                                -------------------------------------------------- -----
Simple and elegant? Yes
The above introduces Adobe photoshop cs4 PHP4 practical application experience part 6, including the content of adobe photoshop cs4. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template