以下字符串怎么转换为数组啊??
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 )
)
)
解决方案 »
- 怎么修改缩进
- php如何在非windows系统上读取二进制文件
- php里面cookie的问题?狠奇怪
- biweb使用感受
- 求一php函数,实现从m个数中选出n个数
- 各位大虾请给点提示......
- 毕业后的去向如何?
- 问一个关于跳转页面的问题?
- PHP中实现将MYSQL数据备份到ODBC(FOXPRO)数据库中,如何进行
- Curl问题: unable to get local issuer certificate Response Status
- 一个很老土的建站问题,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你看来得自己写个函数来解决这个了