For this code, I need to take a line like
<b>hey</b> more text<b>hey2</b> other text
and I expect the returned array to look like
<b>hey</b> more text
<b>hey2</b> other text
However, it is not. How to make it look like above? my test code
$myArr = split("<b>", "<b>hey</b> more text<b>hey2</b> other text");
foreach($myArr as $e)
{
echo "e = $e\n-------------\n";
}
output
e =
-------------
e = hey</b> more text
-------------
e = hey2</b> other text
I need b> to stay. How do I remove the first empty array?
source
to share