PHP foreach循环不同的数组

问题描述 投票:-3回答:1

我有一个数组,我用foreach循环,然后在这个循环中我循环另一个数组。我显示结果但是我从第一个的每个循环中得到第二个数组的所有值....

因此,如果我在第一个数组循环中有3个项目在第一个foreach将显示正常,但在第二个foreach的部分,我将从第二个数组重复数据,而不是单个。

你能帮助,推动我的思考吗?谢谢

    "description": {
        "EN": {
            "headline": "artment in Malmö city",
            "summary": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,",
            "description": "Lorem Ipsum " 
        },
        "DA": {
            "headline": "3 værelses lejlighed i Malmø by",
            "summary": "Lorem Ipsum er simpelthen dummy tekst af t",
            "description": "Lorem Ipsum er simpelthen " 
        },
php arrays
1个回答
0
投票

很明显,第二个foreach循环将在每次执行第一个foreach循环时完全执行

© www.soinside.com 2019 - 2024. All rights reserved.