note 16740 added to function.rand

From: Date: Sun, 11 Nov 2001 20:50:52 +0000
Subject: note 16740 added to function.rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-20736@lists.php.net to get a copy of this message
How do i randomly allocate a set of value into a variable without repeating it? i.e allocate 1, 2, 3, 4, 5 into an array of 5 elements without repeating each value. e.g var[0] = 4 var[1] = 1 var[2] = 3 var[3] = 5 var[4] = 2 who can help? -- http://www.php.net/manual/en/function.rand.php http://master.php.net/manage/user-notes.php?action=edit+16740 http://master.php.net/manage/user-notes.php?action=delete+16740 http://master.php.net/manage/user-notes.php?action=reject+16740

« previous php.notes (#20736) next »