tags:

views:

34

answers:

1

Ok so basically I have a a foreach inside a foreach running through a multidimensional object.. Everything works 100% however inside the second foreaech none of the data will display unless I remove the tags outside of the foreach. Does anyone have an explanation?? I have removed most of the code to simplify it a bit also.

<?php
    $selection = $modules->selection();
    foreach ($selection as $radio_selection) : ?>
    <table border="0" cellspacing="0" cellpadding="0">
                                            <?php
                                            foreach ($radio_selection['fields'] as $radio_selection_fields) :
                                            ?>
                                          <tr>
                                            <td><?php echo $radio_selection_fields['title']; ?></td>
                                            <td><?php echo $radio_selection_fields['field']; ?></td>
                                          </tr>
                                            <?php
                                            endforeach; //End module fields loop
                                            ?>
                </table>

Thanks for any help.

A: 

I apologize for posting a question as an answer, but I'm not allowed to post questions yet, and I need more information before trying to help here.

So my question is, you say, "none of the data will display unless I remove the tags outside of the foreach." Please explain what you mean by this. Even better, if you have found a way of making the code work, please post what it looks like when it works. Comparing working with not working would probably help a lot in formulating an answer.

Sid_M