如何用PHP随机调用字符串中的字符

2025-03-22 13:52:27
推荐回答(1个)
回答1:

$zf = '3,4,10,100,300,1000';
$arr = explode(',', $zf);
echo $arr[rand(0, count($arr) - 1)];