Home  >  Article  >  Backend Development  >  php怎么将一个特殊字符串转为数组

php怎么将一个特殊字符串转为数组

WBOY
WBOYOriginal
2016-06-13 13:27:391126browse

php如何将一个特殊字符串转为数组?
字符串为array('name'=>'tom','pw'=>'hello','email'=>'hello@yahoo.com')
如何转为数组array('name'=>'tom','pw'=>'hello','email'=>'hello@yahoo.com'),
只改变类型(用php,要有较高转换效率),求解,谢谢

------解决方案--------------------
我知道。你传递时。把$arr直接传递行就行了。比如:

PHP code
foo($arr);
function foo($ar=array()){
     .........................
} <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