Home  >  Article  >  Backend Development  >  用php怎么得到一符串的多个子串

用php怎么得到一符串的多个子串

WBOY
WBOYOriginal
2016-06-13 13:28:08916browse

用php如何得到一符串的多个子串
费了一下午功夫也没好一个函数,
如下$e="biid=20120&dat1=20120912";想得到20120和20120912 这两个子串,希望能从高手得到正解,最好是函数形式,不用正则看不懂,呵呵。
谢谢大家和帮主。急!!!

------解决方案--------------------
这样能看懂吧

PHP code
$e = "biid=20120&dat1=20120912";
parse_str($e, $a);
print_r($a); <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn