П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое







Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 98211 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 29084 раз(а).

Учебник HTML.
Просмотров 56208 раз(а).

Руководство по PHP5.
Просмотров 25944 раз(а).

Хостинг через призму DNS.
Просмотров 30473 раз(а).

Подборка текстов стандартных документов.
Просмотров 28985 раз(а).

Учебник PHP - Самоучитель
Просмотров 33738 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 34996 раз(а).

Внешние атаки...
Просмотров 26964 раз(а).

Учебник PHP.
Просмотров 22788 раз(а).

SSI в примерах.
Просмотров 17857 раз(а).



 
 



Руководство по PHP
Пред. Глава 16. Control Structures След.

else

Often you'd want to execute a statement if a certain condition is met, and a different statement if the condition is not met. This is what else is for. else extends an if statement to execute a statement in case the expression in the if statement evaluates to FALSE. For example, the following code would display a is bigger than b if $a is bigger than $b, and a is NOT bigger than b otherwise:

<?php
if ($a > $b) {
    echo
"a is bigger than b";
} else {
    echo
"a is NOT bigger than b";
}
?>

The else statement is only executed if the if expression evaluated to FALSE, and if there were any elseif expressions - only if they evaluated to FALSE as well (see elseif).



 





Copyright © 2005-2011 Project.Net.Ru