PHP Nested if Statement
Postado 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 »Pesquisar
Categorias
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Jogos
- Gardening
- Health
- Início
- Literature
- Music
- Networking
- Outro
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Leia mais
PHP foreach Loop
The foreach loop - Loops through a block of code for each element in an array or each...
PHP Associative Arrays
PHP Associative Arrays
Associative arrays are arrays that use named keys that you assign to...
PHP Break
The break statement can be used to jump out of different kind of loops.
Break in For...
تطورات التعلم الآلي وتأثيرها على مستقبل العمل
مقدمة: في ظل التطورات السريعة للتكنولوجيا والابتكار، أصبح التعلم الآلي...
PHP Strings
A string is a sequence of characters, like "Hello world!".
Strings
Strings in PHP are...