PHP Nested if Statement
Сообщение 2024-05-17 07:47:26
0
4Кб
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 »Поиск
Категории
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Игры
- Gardening
- Health
- Главная
- Literature
- Music
- Networking
- Другое
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Больше
PHP Data Types
PHP Data Types
Variables can store data of different types, and different data types can do...
PHP - Escape Characters
Escape Character
To insert characters that are illegal in a string, use an escape character.
An...
PHP - Concatenate Strings
String Concatenation
To concatenate, or combine, two strings you can use...
PHP Nested if Statement
Nested If
You can have if statements inside if statements, this is...
PHP Update Array Items
Update Array Item
To update an existing array item, you can refer to the index number for...