|
ulf-wendel.de   
|
|
 Home < PHP Schulung  < Core PHP  < Kontrollstrukturen  < while/do..while    |       |  
Print Version    
---
|
|
 Home 
 PHP Projekte 
 PHP Schulung 
    Informationsquellen 
    Geschichte 
    Core PHP 
       Einbindung in HTML 
       Kommentare 
       Variablen 
       Konstanten 
       Operatoren 
       Funktionen 
       Kontrollstrukturen 
          if-else-elseif 
          switch 
          while/do..while 
          for 
          foreach 
          break/continue 
       Arrays 
       Objektorientierung 
    Fortgeschrittenes PHP 
    Templates 
    Cache-Technologien 
    OOH Forms 
 Technik der Site 
 Büchertipps 
 Fotografie 
 Airbrush 
 Kontakt 
 Stuff 

Kontrollstrukturen: while/do..while

C-Stil HTML Variante
while (expr) { statements } while (expr): statements endwhile;
do { statements } while (expr); nicht vorhanden

while/do..while Top

<?php
 
// while mit HTML Syntax
 
$i 0;
 while (
$i 3) :
   ++
$i;
   print 
"while, $i = $i\n";
 endwhile;
 
 print 
"\n$i = $i\n";

 
// fußgesteuert: do...while
 
do {
   ++
$i;
   print 
"do...while, $i = $i\n";
 } while (
$i 3); 

?>
    
Ausgabe Top
while, $i = 1
while, $i = 2
while, $i = 3

$i = 3
do...while, $i = 4

<  ^  >

 Neues

 XML/XSLT Menu
 OOH-Form Rewrite

 PEAR Cache:
  SHM Container

 Suchstring Parser
 Buchrezensionen
 PEAR Cache:
  OutputCompression

 PEAR Menu Browser
 PEAR Menu Tutorial 
 PEAR Cache


 Tipp

Download Version:
oben rechts,
Download *.tar.gz
|
| --- |
|
  Top   |   <  ^  >   |   phpOpenTracker Statistik   |   URL: http://www.ulf-wendel.de/schulung/core/kontrollstrukturen_while.php   |   Stand: 17.01.2002   |   © Ulf Wendel   
|
| --- |

0.016 s Bearbeitungszeit, 0.002 s IT[X], 0.003 s Menu 3