PHP Nested if Statement
Posted 2024-05-17 07:47:26
0
2K
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 »Site içinde arama yapın
Kategoriler
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Oyunlar
- Gardening
- Health
- Home
- Literature
- Music
- Networking
- Other
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Read More
الثورة البلوكتشين وتحولاتها في الصناعات المختلفة
مقدمة: شهدت تقنية البلوكتشين ثورة هائلة في السنوات الأخيرة، حيث أصبحت لديها القدرة على تغيير...
PHP if...else Statements
PHP - The if...else Statement
The if...else statement executes some code if a...
PHP do while Loop
The do...while loop - Loops through a block of code once, and then repeats the loop as...
PHP Data Types
PHP Data Types
Variables can store data of different types, and different data types can do...
PHP Introduction
PHP code is executed on the server.
What You Should Already Know
Before you continue you...