|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-21 17:56 UTC] matthias dot thalmann at sciontec dot com
[2002-06-03 14:00 UTC] edink@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 15 09:00:01 2025 UTC |
The code from the manual: srand ((float) microtime() * 10000000); $input = array ("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand ($input, 2); print $input[$rand_keys[0]]."\n"; print $input[$rand_keys[1]]."\n"; always returns the same array elements.