$sayi = 0; while ($sayi<10) { echo $sayi." "; $sayi++; }

php while example