爆炸一个字符串

What I am trying to achieve is to explode a string into an array as follows:

$arr = explode('<some_tag></some_tag>', $str);

But I want to explode it even if there might be something between the tags:

$str = '<some_tag>text<some_tag>');

Could you please suggest how to settle down the problem?

You can use preg_split() to split a string by a pattern:

$arr = preg_split('!<some_tag>(.*?)</some_tag>!', $str);

Given the information you've provided, I can only guess at what you want, but it looks like you're trying to parse XML. If that's the case, I would suggest giving SimpleXML a try.

http://php.net/manual/en/book.simplexml.php

It comes standard with PHP, but there are some minor bugs in early versions of PHP 5.