I have the following code...that does exactly what I want. Basically, if there is no data in the field it does not display the line....if there is data it displays some text and then the data. There is probably an easier way to do this...but it works. My issue is this...if the data is missing it leaves a blank line in between.
Here is the code:
<br><H3><CENTER><b>Church Services</H3></b></CENTER>
<?php
if(!$SUNDAY_MORNING){
echo '';
}else{
echo '<b>Sunday Morning Service -</b> '.$SUNDAY_MORNING.'';
}
?><br>
<?php
if(!$SUNDAY_SCHOOL){
echo '';
}else{
echo '<b>Sunday School -</b> '.$SUNDAY_SCHOOL.'';
}
?><br>
<?php
if(!$SUNDAY_EVENING){
echo '';
}else{
echo '<b>Sunday Evening Service -</b> '.$SUNDAY_EVENING.'';
}
?><br>
<?php
if(!$WEDNESDAY_EVENING){
echo '';
}else{
echo '<b>Wednesday Evening Service -</b> '.$WEDNESDAY_EVENING.'';
}
?><br>
<?php
if(!$BIBLE_STUDY){
echo '';
}else{
echo '<b>Bible Study -</b> '.$BIBLE_STUDY.'';
}
?>
Here are the results:
Sunday Morning Service - 10:45AM
Bible Study - Sunday at 7:00PM (Pastor Bruce's home, call for directions.)
There was no data entered for Sunday Evening, Sunday School or Wednesday Evening. It leaves a big gab...the way I want it to display is this way:
Sunday Morning Service - 10:45AM
Bible Study - Sunday at 7:00PM (Pastor Bruce's home, call for directions.)
Any ideas?