【发布时间】:2013-08-25 12:43:31
【问题描述】:
如何随机播放 2 行中的 2 个随机单词?
示例我的代码
$lines1 = "one, two, three, four, five";
$lines2 = "aa, bb, cc, dd, ee";
$array=explode(",",$lines1, $lines2);
shuffle($array);
$newstring = implode($array,"");
echo substr($newstring, 0, 1);
$lines1$lines2原字符串
从line1 和line2 中回显2 个单词的选择性随机播放
我想要这样的东西
two这个词来自line1
dd这个词来自line2
输出two dd 或ee three
【问题讨论】:
标签: php arrays string explode shuffle