Skip to content

Instantly share code, notes, and snippets.

@riaf
Forked from hokkai7go/destinations.yaml
Created July 24, 2012 06:08
Show Gist options
  • Save riaf/3168315 to your computer and use it in GitHub Desktop.
Save riaf/3168315 to your computer and use it in GitHub Desktop.
It is used to decide where I travel (in PHP)
<?php
$destinations = array_map('trim', file('destinations'));
echo $destinations[array_rand($destinations)], PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment