Skip to content

Instantly share code, notes, and snippets.

@yitsushi
Created February 3, 2013 13:51
Show Gist options
  • Save yitsushi/4701867 to your computer and use it in GitHub Desktop.
Save yitsushi/4701867 to your computer and use it in GitHub Desktop.
<?php
echo "start\n";
$tomb = array(1,2,3,7,89,2,0,3,5,6,1,2);
for($i = 0; $i < 10; $i++) {
$szam = $tomb[$i];
if ($szam > 10) {
continue;
}
if ($szam < 1) {
break;
}
echo $szam, ";";
echo "A szam ketszerese", $szam * 2, "\n";
}
foreach($tomb as $szam) {
echo $szam, "\n";
}
echo "new:\n";
$i = 0;
for(;;) {
if ($i >= 10) {
break;
}
echo $i;
$i++;
}
$i = 0;
while($i < 10) {
echo $i;
$i++;
}
echo "end\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment