Gold Vision Communications / USA
 GOLDVISION.COM
Serving the Multimedia Community since 1989.
German Site | Spanish Site 

 Web Hosting

 Virtual Dedicated Servers

 Domaincheck

 Order

 Order Status

 Support

 Contact us

 Download

 Network

 Network Status

 Webdesign / Templates

 Make Payment

 Terms & Conditions

 Imprint

 Legal Notices

 Privacy Statement
  PHP / shuffle
shuffle

shuffle

(PHP 3>= 3.0.8, PHP 4 )

shuffle -- Mischt die Elemente eines Arrays

Beschreibung

void shuffle ( array array)

Diese Funktion mischt die Reihenfolge der Elemente eines Arrays zufällig (shuffle). Benutzen Sie srand(), um den Startwert für den Zufallsgenerator festzulegen.

Beispiel 1. shuffle()

$numbers = range (1,20);
srand ((float)microtime()*1000000);
shuffle ($numbers);
while (list (, $number) = each ($numbers)) {
    echo "$number ";
}

Siehe auch arsort(), asort(), ksort(), rsort(), sort() und usort().


© 1998-2007 Gold Vision Communications All Rights Reserved.