PHP Nested if Statement
نشر بتاريخ منذ ٩ أشهر
0
3 الف
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 Add Array Items
Add Array Item
To add items to an existing array, you can use the bracket [] syntax....
PHP Arrays
An array stores multiple values in one single variable:
ExampleGet your own PHP Server
$cars...
PHP Variables Scope
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.
The scope of a...
PHP echo and print Statements
With PHP, there are two basic ways to get output: echo and print.
In this...
PHP Variables
Variables are "containers" for storing information.
Creating (Declaring) PHP Variables
In...