for each filtering?
2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 15, 2009 (RSS)
By s2smedia - January 15, 2009
I have a page that has a list manager.
on that page there are 3 section each pulling from the same list manager.
but for each section i need it to filter only certain field names.
Example: Champions List Manager
1st Place:
<?php foreach ($championsRecords as $record): ?> <- im assuming there is something i need to add to this to filter out certain fields
(this should list champions who have 1st place selected when entered into the List manager)
2nd Place:
<?php foreach ($championsRecords as $record): ?>
(this should list champions who have 2nd place selected when entered into the List manager)
Thanks in advaced!!
on that page there are 3 section each pulling from the same list manager.
but for each section i need it to filter only certain field names.
Example: Champions List Manager
1st Place:
<?php foreach ($championsRecords as $record): ?> <- im assuming there is something i need to add to this to filter out certain fields
(this should list champions who have 1st place selected when entered into the List manager)
2nd Place:
<?php foreach ($championsRecords as $record): ?>
(this should list champions who have 2nd place selected when entered into the List manager)
Thanks in advaced!!
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:
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!
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
interactivetools.com