futurewii Posted May 19, 2009 Share Posted May 19, 2009 Hey all, this one will probably only be a very simple error but I can't get my head around it I am creating a list of schedules for an airline website, In the MYSQL i have fields called mon,tue,wed etc. which have a 1 in if its a day that it flys and a 0 if it doesnt. Im trying to replace the 1 and 0s with images on the page which I have managed to do, but for some reason it also shows the 1 or 0 after too? Here's the page.. (it's only on the Monday column at the moment).. www.flyonesky.org/new_tmp/schedules.php print "<td>"; if($row['mon'] ==0){ echo include 'images/icons/bdot.php'; } elseif ($row['mon'] >0) { echo include 'images/icons/gdot.php'; } print "</td>"; That's the code for the monday column, any posts would be greatly appreciated Link to comment https://forums.phpfreaks.com/topic/158741-very-quick-question/ Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 Take out echo. include returns true or 1 if it includes the file successfully. Link to comment https://forums.phpfreaks.com/topic/158741-very-quick-question/#findComment-837204 Share on other sites More sharing options...
futurewii Posted May 19, 2009 Author Share Posted May 19, 2009 I love you .... ??? Thanks a lot Link to comment https://forums.phpfreaks.com/topic/158741-very-quick-question/#findComment-837225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.