Created
September 25, 2018 05:51
-
-
Save widiu7omo/f9c6e0e500fff26ef3341caee8146859 to your computer and use it in GitHub Desktop.
Make Lyrics with Array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lirik = "doo doo, doo doo doo doo"; | |
$lagu = array("Baby Shark","Mummy Shark","Daddy Shark","Grandma Shark","Granpa Shark","Lets go hunt","Run away","Safe at last","It's the end"); | |
for ($i=0; $i <9; $i++) | |
{ | |
for ($j=0; $j <=5; $j++) | |
{ | |
if($i == $i && $j<4){ | |
if($i == $i && $j<3){ | |
echo''.$lagu[$i].' '.$lirik.' <br>'; | |
} | |
else{ | |
echo''.$lagu[$i].' <br><br>'; | |
} | |
} | |
} | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment