PHP Nested if Statement
Posté 2024-05-17 07:47:26
0
4KB
Nested If
You can have if
statements inside if
statements, this is called nested if
statements.
ExampleGet your own PHP Server
An if
inside an if
:
$a = 13;
if ($a > 10) {
echo "Above 10";
if ($a > 20) {
echo " and also above 20";
} else {
echo " but not above 20";
}
}
Try it Yourself »Rechercher
Catégories
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Jeux
- Gardening
- Health
- Domicile
- Literature
- Music
- Networking
- Autre
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Lire la suite
PHP Variables Scope
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.
The scope of a...
PHP Loops
In the following chapters you will learn how to repeat code by using loops in PHP.
PHP Loops...
PHP Global Variables - Superglobals
Superglobals were introduced in PHP 4.1.0, and are built-in variables that are always available...
PHP Indexed Arrays
PHP Indexed Arrays
In indexed arrays each item has an index number.
By default, the first item...
تطورات التعلم الآلي وتأثيرها على مستقبل العمل
مقدمة: في ظل التطورات السريعة للتكنولوجيا والابتكار، أصبح التعلم الآلي...