【发布时间】:2014-07-12 18:07:21
【问题描述】:
我有一个想要爆炸的数组。该数组有三个分隔符,我想将它们放在三个不同的变量中。
这是数组:-
the_first|Little Detail|Some Large Details with a para of text
the_second|Little Detail|Some Large Details with a para of text
the_third|Little Detail|Some Large Details with a para of text
这是我所做的:-
$extra_details = "has the above array"
$array = array();
foreach ($extra_details as $r) {
$array[] = explode("|", $r);
}
我希望我能得到每个我可以使用的多维数组。
【问题讨论】:
-
那么分隔符是什么?我可以看到
|,我猜第二个是新行,那么第三个是什么?
标签: php arrays preg-replace explode