Skip to content

Instantly share code, notes, and snippets.

@simkimsia
Created June 5, 2012 15:36
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 simkimsia/2875743 to your computer and use it in GitHub Desktop.
Save simkimsia/2875743 to your computer and use it in GitHub Desktop.
for learning GET params
<?php
//Define an array of character information
$characters = array(
'yakko' => array (
'id' => 'yakkowarner',
'url' => 'characterview.php?id=yakkowarner',
'name' => 'Yakko Warner'
),
'wakko' => array (
'id' => 'wakkowarner',
'url' => 'characterview.php?id=wakkowarner',
'name' => 'Wakko Warner'
),
'dot' => array (
'id' => 'dotwarner',
'url' => 'characterview.php?id=dotwarner',
'name' => 'Dot Warner'
),
);
?><html>
<body>
<font size = "7"><big>List of characters : </big></font>
<p>
<ol> <!-- use this for numbered list -->
<?php foreach ($characters as $key => $character) :?>
<li><a href ="<?php echo $character['url']; ?>"><?php echo $character['name'];?></a></li>
<?php endforeach; ?>
</ol>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment