日期:2014-05-17  浏览次数:20471 次

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()){
     .........................
}