以下字符串怎么转换为数组啊??
Array
(
[sum] => 403483
[0] => Array
(
[0] => Array
(
[id] => 376748
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821
) [1] => Array
(
[id] => 376749
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821 )
)
)
Array
(
[sum] => 403483
[0] => Array
(
[0] => Array
(
[id] => 376748
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821
) [1] => Array
(
[id] => 376749
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821 )
)
)
解决方案 »
- 页面嵌入到dz模板里
- 请问什么是PHP文件ZEND加密,如何加密
- 获取支付接口回调值
- 新建PHP / linuxQ群6665551
- 网址出现端口号的问题,请教
- 请问如何把一个纯html的文件改写成php格式的?
- 请高手帮忙看看!!!为什么以下代码利用internet上不能进行预览啦(页面上什么东西都没有,一片空白)?
- [在线等!!]急 PHP连接MYSQL数据库 错误!!!
- min函数查询问题
- php怎么实现一个可以增加、编辑记录的弹出窗口?
- 一个很老土的建站问题,cannot load mysql extension; please check PHP configuration
- 请教php和VB的问题
lz是说有这些文字内容想组数组么?
$arr = new array();
$arr = Array
(
[sum] => 403483
[0] => Array
(
[0] => Array
(
[id] => 376748
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821
) [1] => Array
(
[id] => 376749
[unitprice] =>
[rentprice] => 2800
[buildingarea] => 72
[floor] => 12/18
[inputsource] => agent
[passportid] => 0
[shopid] => 821 )
)
)
$arr = array("key1"=>"val1","key2"=>"val2")
$arr = Array
(
"sum" => 403483 ,
"0" => Array
(
"0" => Array
(
"id" => 376748 ,
"unitprice" => "",
"rentprice" => 2800 ,
"buildingarea" => 72 ,
"floor" => "12/18" ,
"inputsource" => "agent" ,
"passportid" => 0 ,
"shopid" => 821
) , "1" => Array
(
"id" => 376749 ,
"unitprice" => "",
"rentprice" => 2800 ,
"buildingarea" => 72 ,
"floor" => "12/18" ,
"inputsource" => "agent" ,
"passportid" => 0 ,
"shopid" => 821 )
)
) ;
(
[sum] => 403483
[0] => Array
(
[0] => Array
(
[id] => 376748要变成Array
(
"sum" => 403483,
"0" => Array
(
Array
(
"id" => 376748
首先 [] 要变成 ""
每行最后要有,【逗号】,但最后一行没有,全满足后才可以Eval你看来得自己写个函数来解决这个了