标签:
注意array_rand随机返回的是KEY值的集合
<?php 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"; ?>
标签:
原文地址:http://www.cnblogs.com/kenshinobiy/p/4739520.html