for schleife php code example
Example 1: php for schleife
for ($i = 1; $i <= 10; $i++) {
echo $i;
}
Example 2: php for each schleife
foreach ($name as $key => $value) {
echo ("Position {$key} enthält {$value}. ");
}
for ($i = 1; $i <= 10; $i++) {
echo $i;
}
foreach ($name as $key => $value) {
echo ("Position {$key} enthält {$value}. ");
}