Bman900 Posted May 1, 2009 Share Posted May 1, 2009 I want to put in an HTML table in an if statement because I only want it to show up in a certain situation but I can't see to do it. I tried echo and even print but nothing works. What should I do? Link to comment https://forums.phpfreaks.com/topic/156350-how-to-echo-html-table-inside-php/ Share on other sites More sharing options...
mikesta707 Posted May 1, 2009 Share Posted May 1, 2009 if (your condition){ echo "<table>"; //other table stuff } ? Link to comment https://forums.phpfreaks.com/topic/156350-how-to-echo-html-table-inside-php/#findComment-823183 Share on other sites More sharing options...
nankoweap Posted May 1, 2009 Share Posted May 1, 2009 or... <?php if (your condition) { ?> <table> ... <?php } ?> jason Link to comment https://forums.phpfreaks.com/topic/156350-how-to-echo-html-table-inside-php/#findComment-823189 Share on other sites More sharing options...
Bman900 Posted May 1, 2009 Author Share Posted May 1, 2009 or... <?php if (your condition) { ?> <table> ... <?php } ?> That one worked, thanks! jason Link to comment https://forums.phpfreaks.com/topic/156350-how-to-echo-html-table-inside-php/#findComment-823191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.