Skip to content

Instantly share code, notes, and snippets.

@heylastway
Created November 1, 2019 13:20
Show Gist options
  • Save heylastway/b57ac2f04fac5781e874b957a6e1e3e6 to your computer and use it in GitHub Desktop.
Save heylastway/b57ac2f04fac5781e874b957a6e1e3e6 to your computer and use it in GitHub Desktop.
<?php
$a = 1;
while ($a <= 20) {
echo "Hello $a<br> ";
$a += 4;
}
for ($i = 1; $i <=5; $i++) {
echo "Welcome <br>";
}
$my_array = ['BMW', 'Kia', 'Audi'];
echo '<ul>';
foreach ($my_array as $item) {
echo '<li>' . $item . '</li>';
}
echo '</ul>';
for ($i = 0; $i < count($my_array); $i++) {
echo $my_array[$i];
echo '<br>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment