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

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

WBOY
Release: 2016-06-13 13:27:39
Original
1141 people have browsed it

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>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template