18.12. Randomizing All Lines in a File
$lines = file('quotes-of-the-day.txt'); $lines = pc_array_shuffle($lines);
The pc_array_shuffle( ) function from Section 4.21 is more random than PHP's built-in shuffle( ) function, because it uses the Fisher-Yates shuffle, which equally distributes the elements throughout the array.
18.12.4. See Also
Copyright © 2003 O'Reilly & Associates. All rights reserved.