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? Quote 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 } ? Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.