TecTao Posted August 18, 2008 Share Posted August 18, 2008 I have decided to use an If / Else statement which has an argument that is determined if one table cell is empty any data or not. this is what I have as the If portion. if ( $med_yt_code > '0' ) { Stuff} Else {the other stuff} so if the table cell med_yt_code is empty, then the Else portion will display, otherwise the stuff in the med_yt_code will display. If anyone has any better suggestions on determining if a table is is empty in an If/Else, i'm interested in your suggestions. Thanks in advance, Michael Conway www.TecTaoDesigns.com Link to comment https://forums.phpfreaks.com/topic/120123-solved-if-statement-to-select-a-non-emtpy-table-cell/ Share on other sites More sharing options...
JD* Posted August 18, 2008 Share Posted August 18, 2008 I'm assuming that the variable $med_yt_code is being echoed into the table cell. If that is the case, you'd be better off checking it like this: if(!empty($med_yt_code)) { stuff } else { the other stuff } That will check if the variable is empty instead of greater than 0, which is probably closer to what you're looking for. Link to comment https://forums.phpfreaks.com/topic/120123-solved-if-statement-to-select-a-non-emtpy-table-cell/#findComment-618874 Share on other sites More sharing options...
TecTao Posted August 18, 2008 Author Share Posted August 18, 2008 That's what' i'm looking for, thanks a bunch. m Link to comment https://forums.phpfreaks.com/topic/120123-solved-if-statement-to-select-a-non-emtpy-table-cell/#findComment-618886 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.