How do I Loop through all phrases and output them as a list of links, with GET-parameters?
How do I make an array, indexed with integers then use a GET-variable to choose one of these phrases.
My code so far;
$arr = array('1' => 'Que será, será.', '2' => 'C’est la vie!', '3' => 'Sich nicht um ungelegte Eier kümmern.', '4' => 'Ada asap, ada api.', '5' => 'Batti il ferro finché è caldo.');
?>
<p><?php print $arr[1]; ?> - Whatever will be, will be.</p>
<p><?php print $arr[2]; ?> – That’s the life.</p>
<p><?php print $arr[3]; ?> - Don’t count your chickens before they hatch.</p>
<p><?php print $arr[4]; ?> - There's no smoke without fire.</p>
<p><?php print $arr[5]; ?> - Strike while the iron is hot.</p>
$arr[...], except that...will be something coming from$_GET. Not directly$_GET['var']because that's trusting user input too far.