Perl CGI table row heading

D

dan

I want to create a table with Perl CGI that looks like this:

<table>
<tr>
<th>Row heading</th>
<td>test1</td>
<td>test2</td>
</tr>
</table>

The following creates a table with two rows

table (
Tr ([
th ('row heading'),
td (['test', 'test2'])
])
),

what am I doing wrong?

dan
 
S

sreservoir

dan said:
I want to create a table with Perl CGI that looks like this:

<table>
<tr>
<th>Row heading</th>
<td>test1</td>
<td>test2</td>
</tr>
</table>

The following creates a table with two rows

table (
Tr ([
th ('row heading'),
td (['test', 'test2'])
])
),

what am I doing wrong?

perhaps check the output output of the snippet.

its output, indented nicely:

<table>
<tr>
<th>row heading</th>
</tr>
<tr>
<td>test</td>
<td>test2</td>
</tr>
</table>

you want to remove the brackets in the arguments to Tr:
<table>
<tr>
<th>row heading</th>
<td>test</td>
<td>test2</td>
</tr>
</table>

try:
table(
Tr(
th("row heading"),
td [ "test", "test2" ]));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,215
Messages
2,571,113
Members
47,711
Latest member
RosalindKe

Latest Threads

Top