【发布时间】:2015-04-26 21:10:49
【问题描述】:
我已经完成了一半,并且对输出的内爆感到震惊。
我有一个字符串
$text = "test | (3), new | (1), hello | (5)";
$text = explode(",", $text);
foreach ($text as $t){
$tt = explode(" | ", $t);
print_r($tt[0]);
}
当我打印上面的数组时,它会根据需要给我test new hello,现在,我需要像这样添加一个逗号test, new, hello
我搜索但无法实现,因此在此发帖寻求帮助。
【问题讨论】: