PHP Nested if Statement
Сообщение 2024-05-17 07:47:26
0
2Кб
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 Syntax
A PHP script is executed on the server, and the plain HTML result is sent back to the browser....
PHP - Slicing Strings
Slicing
You can return a range of characters by using the substr() function.
Specify...
PHP Constants
Constants are like variables, except that once they are defined they cannot be changed or...
PHP Loops
In the following chapters you will learn how to repeat code by using loops in PHP.
PHP Loops...
PHP while Loop
The while loop - Loops through a block of code as long as the specified condition is...