Need 4 Eyes for Alternative PHP Syntax Troubleshooting

I’m not used to this PHP syntax, and I’ve used to Procedural. I’m wonking with this framework and just want to be sure I’m doing my PHP right.

1  <<?php print $options['type']; ?>>
2    <?php foreach ($rows as $id => $row): ?>
3       <li class="<?php print $classes[$id]; ?>">
4       <?php print $row; ?></li>
5    <?php endforeach; ?>
6  </<?php print $options['type']; ?>>

First let me ask about line 2 and line 4. This is iterating over the $rows var to print $row, which we assume is an array containing database data, yes?

And second, if I added a line

<li><?php print $classes[$id]; ?></li>

before line 5 I could get a second list element added with the $ID var (its just a goof to check my edits are in the correct template file), yes?

That’s it. I could test this, of course, and not bother posting. :blush: Its just good to be posting here again. I’ve been off doing other frameworks…:eye:

I see there is no problem with your code. I got 4 eyes. :stuck_out_tongue:

It’s always a good idea to look at the resulting output.
Perhaps it is the PHP code, perhaps it’s the HTML output which is malformed?

Can you provide us with the resulting HTML output?

@ zalucius: That’s just the problem. I’m using a framework and I can’t get my template changes to show any effect with the output. :injured:

Thanks for the replies!