function Ryl($text) { //分割输入的字符串 $text=explode("|",$text); //计算数组个数 $n=count($text)-1; //随机数 $n=rand(0,$n); return $text[$n]; }