Jump to content

Correct way to create a table within <?php ?>


NAmeviolated

Recommended Posts

 

Had some great help yesterday, but I'm stuck using <?php ?> on every line, thanks to Joomla

 

Anyway, I'm trying to create a table, and it doesn't seem to be working, to create it, what is the correct format?

 

<?php <table width='400px' border ='1'>; ?>  ??

 

output will be put out on a per line within a if statement, which works, just the framing of the table and tr and td seem to be eluding me.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/249823-correct-way-to-create-a-table-within/
Share on other sites

Or alternatively come out of your <?php ?> tags and just put pure HTML in then reopen you tags as and when you need to.

 

ie

<?php

/* Some php code defining variables, functions etc etc*/

?>
<table>
<tr><td>blah blah <?php echo $variable ?> blah </td></tr>
</table>
<?php 
// more php code

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.