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 Functions
The real power of PHP comes from its functions.
PHP has more than 1000 built-in functions, and...
الثورة البلوكتشين وتحولاتها في الصناعات المختلفة
مقدمة: شهدت تقنية البلوكتشين ثورة هائلة في السنوات الأخيرة، حيث أصبحت لديها القدرة على تغيير...
PHP Arrays
An array stores multiple values in one single variable:
ExampleGet your own PHP Server
$cars...
PHP Nested if Statement
Nested If
You can have if statements inside if statements, this is...
PHP Add Array Items
Add Array Item
To add items to an existing array, you can use the bracket [] syntax....