Skip to content

Instantly share code, notes, and snippets.

@widiu7omo
Created September 25, 2018 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save widiu7omo/f9c6e0e500fff26ef3341caee8146859 to your computer and use it in GitHub Desktop.
Save widiu7omo/f9c6e0e500fff26ef3341caee8146859 to your computer and use it in GitHub Desktop.
Make Lyrics with Array
<?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