Filter down to one heading
Posted: Tue Nov 04, 2008 10:02 am
Within the loop below I only want to return echo "<br><h1>Future Engag</h1>"; once so that it displays better on the webpage. As it stands it naturally returns ‘Future Engag’ for each iteration of the loop for example
Future Engag
Today
Future Engag
Tomorrow
Future Engag
Next week
When I really need
Future Engag
Today
Tomorrow
Next week
How do I filter this out? I have been trying to use something like this in an array
// If any of the values are repeated set message.
if ($occurences > 1) {
echo Future Engag;
But this is still not working for me
Thanks for any pointers
Future Engag
Today
Future Engag
Tomorrow
Future Engag
Next week
When I really need
Future Engag
Today
Tomorrow
Next week
How do I filter this out? I have been trying to use something like this in an array
// If any of the values are repeated set message.
if ($occurences > 1) {
echo Future Engag;
But this is still not working for me
Thanks for any pointers
Code: Select all
// Look for future dates 2009 2010 etc
do {
echo "<br><h1>Future Engag</h1>"; ?>
<a href="future.php?id=<?php echo $row_GetEngag['eng_id']; ?>"> <?php echo $row_GetEngag['head']; ?></a><br />
<?php } while ($row_GetEngag = mysql_fetch_assoc($GetEngag)); ?>