Skip to content

Instantly share code, notes, and snippets.

@beshur
Created March 1, 2013 09:34
Show Gist options
  • Save beshur/5063527 to your computer and use it in GitHub Desktop.
Save beshur/5063527 to your computer and use it in GitHub Desktop.
PHP generate two different random numbers simple
<?
$present_in = rand(0,4);
$present_in2 = $present_in;
while ($present_in2 == $present_in) {
$present_in2 = rand(0,4);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment