PHP Nested if Statement

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 »
Поиск
Категории
Больше
Другое
PHP Functions
The real power of PHP comes from its functions. PHP has more than 1000 built-in functions, and...
От PHP Tutorial 2024-05-17 07:53:06 0 4Кб
Другое
الثورة البلوكتشين وتحولاتها في الصناعات المختلفة
مقدمة: شهدت تقنية البلوكتشين ثورة هائلة في السنوات الأخيرة، حيث أصبحت لديها القدرة على تغيير...
От MOHAMED ATTALLAH 2024-05-14 14:03:03 0 7Кб
Другое
PHP Arrays
An array stores multiple values in one single variable: ExampleGet your own PHP Server $cars...
От PHP Tutorial 2024-05-17 07:53:31 0 6Кб
Другое
PHP Nested if Statement
Nested If You can have if statements inside if statements, this is...
От PHP Tutorial 2024-05-17 07:47:26 0 4Кб
Другое
PHP Add Array Items
Add Array Item To add items to an existing array, you can use the bracket [] syntax....
От PHP Tutorial 2024-05-17 08:06:05 0 7Кб
Sociallez https://sociallez.com