Foreach循环不起作用,但它从我的数组中获取2个项目?

时间:2017-05-12 07:33:54

标签: php html

我做了这个foreach循环,但它只是没有在屏幕上显示任何东西没有人看到问题是什么? 数组$ data ['page'] ['children']

中有2项
<?php foreach ($data['page']['childeren'] as $news): ?>
                <div class="donerenNews">
                    <div class="doneren-image">
                        <img class="group list-group-image doneren-image" src="<?php echo $site_url ?>assets/img/placeholderSubPage.png" alt="">
                    </div>
                    <div class="caption doneren-tekst-left">
                        <h1>
                            <?php echo $news['title'] ?>
                        </h1>
                        <p>
                            <?php echo $news['description'] ?>
                        </p>
                    </div>
                 </div>
        <?php endforeach; ?>

0 个答案:

没有答案