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 if...else Statements
PHP - The if...else Statement
The if...else statement executes some code if a...
تطورات التعلم الآلي وتأثيرها على مستقبل العمل
مقدمة: في ظل التطورات السريعة للتكنولوجيا والابتكار، أصبح التعلم الآلي...
PHP Installation
What Do I Need?
To start using PHP, you can:
Find a web host with PHP and MySQL support...
PHP Casting
Sometimes you need to change a variable from one data type into another, and sometimes you want a...
PHP Break
The break statement can be used to jump out of different kind of loops.
Break in For...