SkyRanger Posted May 23, 2011 Share Posted May 23, 2011 I am having a problem trying to show if cell is empty echo one thing if empty and starttime if there is one: if(isset($rown['starttime'])) { echo "Add Day"; } else { echo $rown['starttime']; } Link to comment https://forums.phpfreaks.com/topic/237264-empty-table-cell/ Share on other sites More sharing options...
fugix Posted May 23, 2011 Share Posted May 23, 2011 what are your results Link to comment https://forums.phpfreaks.com/topic/237264-empty-table-cell/#findComment-1219277 Share on other sites More sharing options...
SkyRanger Posted May 23, 2011 Author Share Posted May 23, 2011 Figured it out, for 1 thing, had the stuff backwards, and second should have used !empty instead of isset: $eventstart = $rown['starttime']; if(!empty($eventstart)) { echo $rown['starttime']; } else { echo "All Day"; } Link to comment https://forums.phpfreaks.com/topic/237264-empty-table-cell/#findComment-1219281 Share on other sites More sharing options...
fugix Posted May 23, 2011 Share Posted May 23, 2011 Figured it out, for 1 thing, had the stuff backwards, and second should have used !empty instead of isset: $eventstart = $rown['starttime']; if(!empty($eventstart)) { echo $rown['starttime']; } else { echo "All Day"; } normally i only use isset() for checking if a submit button has been pressed...it only really checks if the variable exists..not if it contains data Link to comment https://forums.phpfreaks.com/topic/237264-empty-table-cell/#findComment-1219286 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.