showing special by day of week

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 25, 2011   (RSS)

By rez - February 25, 2011

I have a list (checkboxes) manually made in one editor with Monday, Tuesday, Wednesday, etc.

I am simply trying to show the special for today by day name like this (or a better way of course, in the top of the page instead?):
<?php foreach ($weekly_specialsRecords as $record): ?>

<?php if (date("l") == $record['when']): ?>
<?php echo $record['title'] ?><br/>
<?php endif ?>

<?php endforeach ?>


Which is not working. Thats probably an easy fix but I also have two more problems with this:
1. Not sure how to show specials that are on multiple days. (Monday, Wednesday) Looping through an array or something? I'm clueless with that.
2. Not sure now to handle a special that is every other Saturday. ?! I looked into the custom strartotime and followed the link to php.net in the field options. I'm guessing the answer is something to do with this but i dont know how to say every other saturday and if i did, not sure how that would work in the same editor as the other specials.

hopefully, i'm over complicating this.
thanks for any help.