PHP 数组转换
$a=Array([0]=>Array([day]=>/[tojiurl]=>20)[1]=>Array([day]=>/effect/1-7.html[tojiurl]...
$a=Array (
[0] => Array ( [day] => / [tojiurl] => 20 )
[1] => Array ( [day] => /effect/1-7.html [tojiurl] => 3 )
[2] => Array ( [day] => /praise.html [tojiurl] => 2 )
[3] => Array ( [day] => /effect/1-4.html [tojiurl] => 2 )
[4] => Array ( [day] => /effect/1-6.html [tojiurl] => 2 )
[5] => Array ( [name] => Sogou web [tojiname] => 13 )
[6] => Array ( [name] => Google [tojiname] => 11 )
[7] => Array ( [name] => 百度PC蜘蛛 [tojiname] => 10 )
[8] => Array ( [name] => 360PC蜘蛛 [tojiname] => 1 )
[9] => Array ( [name] => 360移动蜘蛛 [tojiname] => 1 )
[10] => Array ( [url] => / [zhuantai] => 404 [ztid] => 1 )
[11] => Array ( [dateline] => 1554432969 [so] => Sogou web [sjid] => 1 )
[12] => Array ( [dateline] => 1554530873 [so] => Sogou web [sjid] => 1 )
[13] => Array ( [dateline] => 1554410795 [so] => Sogou web [sjid] => 1 )
[14] => Array ( [dateline] => 1554462555 [so] => 百度PC蜘蛛 [sjid] => 1 )
[15] => Array ( [dateline] => 1554369525 [so] => Sogou web [sjid] => 1 )
)
转换成下面这种数组
$b=Array (
[0] => Array ( [day] => / [tojiurl] => 20 [name] => Sogou web [tojiname] => 13 [url] => / [zhuantai] => 404 [ztid] => 1 [dateline] => 1554432969 [so] => Sogou web [sjid] => 1)
[1] => Array ( [day] => /effect/1-7.html [tojiurl] => 3 [name] => Google [tojiname] => 11 [url] => [zhuantai] => [dateline] => 1554530873 [so] => Sogou web [sjid] => 1)
[2] => Array ( [day] => /praise.html [tojiurl] => 2 [name] => 百度PC蜘蛛 [tojiname] => 10 [url] => [zhuantai] => [dateline] => 1554410795 [so] => Sogou web [sjid] => 1)
[3] => Array ( [day] => /effect/1-4.html [tojiurl] => 2 [name] => 360PC蜘蛛 [tojiname] => 1 [url] => [zhuantai] => [dateline] => [dateline] => 1554462555 [so] => 百度PC蜘蛛 [sjid] => 1)
[4] => Array ( [day] => /effect/1-6.html [tojiurl] => 2 [name] => 360移动蜘蛛 [tojiname] => 1 [url] => [zhuantai] => [dateline] => 1554369525 [so] => Sogou web [sjid] => 1)
) 展开
[0] => Array ( [day] => / [tojiurl] => 20 )
[1] => Array ( [day] => /effect/1-7.html [tojiurl] => 3 )
[2] => Array ( [day] => /praise.html [tojiurl] => 2 )
[3] => Array ( [day] => /effect/1-4.html [tojiurl] => 2 )
[4] => Array ( [day] => /effect/1-6.html [tojiurl] => 2 )
[5] => Array ( [name] => Sogou web [tojiname] => 13 )
[6] => Array ( [name] => Google [tojiname] => 11 )
[7] => Array ( [name] => 百度PC蜘蛛 [tojiname] => 10 )
[8] => Array ( [name] => 360PC蜘蛛 [tojiname] => 1 )
[9] => Array ( [name] => 360移动蜘蛛 [tojiname] => 1 )
[10] => Array ( [url] => / [zhuantai] => 404 [ztid] => 1 )
[11] => Array ( [dateline] => 1554432969 [so] => Sogou web [sjid] => 1 )
[12] => Array ( [dateline] => 1554530873 [so] => Sogou web [sjid] => 1 )
[13] => Array ( [dateline] => 1554410795 [so] => Sogou web [sjid] => 1 )
[14] => Array ( [dateline] => 1554462555 [so] => 百度PC蜘蛛 [sjid] => 1 )
[15] => Array ( [dateline] => 1554369525 [so] => Sogou web [sjid] => 1 )
)
转换成下面这种数组
$b=Array (
[0] => Array ( [day] => / [tojiurl] => 20 [name] => Sogou web [tojiname] => 13 [url] => / [zhuantai] => 404 [ztid] => 1 [dateline] => 1554432969 [so] => Sogou web [sjid] => 1)
[1] => Array ( [day] => /effect/1-7.html [tojiurl] => 3 [name] => Google [tojiname] => 11 [url] => [zhuantai] => [dateline] => 1554530873 [so] => Sogou web [sjid] => 1)
[2] => Array ( [day] => /praise.html [tojiurl] => 2 [name] => 百度PC蜘蛛 [tojiname] => 10 [url] => [zhuantai] => [dateline] => 1554410795 [so] => Sogou web [sjid] => 1)
[3] => Array ( [day] => /effect/1-4.html [tojiurl] => 2 [name] => 360PC蜘蛛 [tojiname] => 1 [url] => [zhuantai] => [dateline] => [dateline] => 1554462555 [so] => 百度PC蜘蛛 [sjid] => 1)
[4] => Array ( [day] => /effect/1-6.html [tojiurl] => 2 [name] => 360移动蜘蛛 [tojiname] => 1 [url] => [zhuantai] => [dateline] => 1554369525 [so] => Sogou web [sjid] => 1)
) 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询