Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>I am the King of Arrays!</title>
- </head>
- <body>
- <p>
- <?php
- // On the line below, create your own associative array:
- $myArray = array("LOL" => "Laugh out loud!", "FYI" => "For your information");
- // On the line below, output one of the values to the page:
- echo $myArray["LOL"] . "<br>";
- // On the line below, loop through the array and output
- // *all* of the values to the page:
- foreach ($myArray as $abriv=>$ext) {
- echo $abriv . " means " . $ext . "<br>";
- }
- ?>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement