for each filtering?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 15, 2009   (RSS)

Re: [s2smedia] for each filtering?

By Dave - January 15, 2009

Hi s2smedia,

I don't know what your fieldnames are but try something like this:

2nd Place:
<?php foreach ($championsRecords as $record): ?>
<?php if ($record['place'] != '1st') { continue; } ?>


continue means "skip to the next record". So that line means "if the value of the place field isn't "1st" then skip to the next one.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com