我想要一点PHP函数来选择介于0到5的数字,50%%的机会,这将是零,也同时随机两个字符串之间进行选择:在php中处理随机数字?
算法:
choose number between 0,1,2,3,4,5 randomly
(50% chance for zero, 50% chance for 1,2,3,4,5)
and
choose string blue, yellow randomly
return(number, string);
可以在一个函数中做到这一点。欢呼:))谢谢
欢呼多数民众赞成在完美的作品,谢谢 – getaway 2010-10-26 04:45:54