我的字符串$content
包含大量的文字。我想爆炸$content
,分隔符是数组$array_explode
中任何值的第一个资源。有谁可以帮助我?
类似的东西:
$content="...";
$array_explode = array("<br>", "<p>", "<h2>", "<h1>", "<h3>");
$content_explode = explode($array_explode, $content);
答案 0 :(得分:-1)
<?php
$content = "...";
$content = str_replace(array("<br>", "<p>", "<h2>", "<h1>", "<h3>"), array("<br>".chr(30), "<p>".chr(30), "<h2>".chr(30), "<h1>".chr(30), "<h3>".chr(30)), $content);
$content_explode = explode(chr(30), $content);
?>