evinda
Gold Member
MHB
- 3,741
- 0
Klaas van Aarsen said:That does not look like correct php.
I've added line numbers to your code.
- In line 2 we have a foreach with brace open {, but I don't see a corresponding endforeach with a brace close }.Code:1. <?php 2. foreach($content as $deviceType => $deviceAttribute => $filters) { 3. ?> 4. <input type="checkbox" checked="checked"><?php echo $filters;<br/> ?> 5. ?>
- In line 2 the syntax of foreach is not valid. Perhaps we should have a nested foreach?
- In line 4 we echo \$filters, but that is not a string, but an array.
- In line 5 we have a ?> that does not seem to belong to any starting <?php.
(Sweating)
I made some changes:
Code:
1. <?php
2. foreach($content as $deviceType => $deviceAttribute) {
3. foreach ($deviceAttribute as $deviceAttribute=> $filters){
4. ?>
5. <input type="checkbox" checked="checked"><?php echo $filters;<br/> ?>
6. <?php
7. }
8. }
9. ?>
