Книга: Fedora™ Unleashed, 2008 edition

while

while
while
performs a block of statements as long as a particular condition is true:

while ($x<10) {
 print "$xn";
 $x++;
}

Remember that the condition can be anything that returns a true or false value. For example, it could be a function call:

while ( InvalidPassword($user, $password) ) {
 print "You've entered an invalid password. Please try again.n";
 $password = GetPassword;
}

Оглавление статьи/книги

Генерация: 0.153. Запросов К БД/Cache: 2 / 0
поделиться
Вверх Вниз