【发布时间】:2016-08-15 19:39:30
【问题描述】:
我有循环数据:
image1
url1
description1
image2
url2
description2
image3
url3
description3
image4
url4
description4
image5
url5
description5
结果:
var imagesDataArray = [
{
src: 'images1',
url: 'url1',
description: 'description1'
},
{
src: 'images2',
url: 'url2',
description: 'description2'
},
{
src: 'images3',
url: 'url3',
description: 'description3',
},
{
src: 'images4',
url: 'url4',
description: 'description4'
},
{
src: 'images5',
url: 'url5',
description: 'description5'
}
];
【问题讨论】:
-
你想把php数组转成json吗?
标签: javascript php json