多维数组唯一PHP中的问题
你好。我正在使用多维数组唯一PHP中的问题,php,arrays,json,multidimensional-array,Php,Arrays,Json,Multidimensional Array,你好。我正在使用 $manual['pages'] = array_map("unserialize", array_unique(array_map("serialize", $manual['pages']))); 在制作独特的is后,它会给我输出 { "items": [ { "manuals": [], "versions": [], "pages": { "0": { "i
$manual['pages'] = array_map("unserialize", array_unique(array_map("serialize", $manual['pages'])));
在制作独特的is后,它会给我输出
{
"items": [
{
"manuals": [],
"versions": [],
"pages": {
"0": {
"id": "25",
"short_title": "Windows 7 Software",
"full_title": "Windows 7 Software",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"1": {
"id": "26",
"short_title": "Software: The New Paint",
"full_title": "Software: The New Paint",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"2": {
"id": "27",
"short_title": "Software: The New Wordpad",
"full_title": "Software: The New Wordpad",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"3": {
"id": "28",
"short_title": "Software: The New Calculator",
"full_title": "Software: The New Calculator",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"4": {
"id": "29",
"short_title": "Software: The New Word",
"full_title": "Software: The New Word",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"5": {
"id": "30",
"short_title": "Software: Windows Media Player 12",
"full_title": "Software: Windows Media Player 12",
"image": "http://marksmith.biz/media/7.jpg",
"tags": [
{
"name": "Software"
}
]
},
"7": {
"id": "11",
"short_title": "Software Compatibility",
"full_title": "Software Compatibility",
"image": "http://marksmith.biz/media/7.jpg",
"tags": []
}
},
"faqs": []
}
],
"success": "true"
}
现在我的问题是你们可以看到pages数组。你们可以找到像0,1,2,3这样的数字。我想从数组中删除这些数字
任何帮助都将不胜感激 我找到了答案。只需使用数组_值,它就会从输出中删除 它们叫做索引。为什么要删除它们?你不需要。是的,我知道这些被称为索引,但我在angular JS中使用这个JSON,这给我带来了一些问题,所以我想删除这些索引。如果删除它们,你将如何遍历页面结果?如果您向我们展示用于读取JSON的代码,我们可能会提供更多帮助。