Re: HTML/Table - colspan problem
| From: | Alain Williams | Date: | Fri, 14 Nov 2003 14:19:28 +0000 |
| Subject: | Re: HTML/Table - colspan problem | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8941@lists.php.net to get a copy of this message | ||
On Fri, Nov 14, 2003 at 02:43:23PM +0100, Klaus Guenther wrote:
> Alain Williams wrote:
> > Hi,
> >
> > I want to have a table where the first row of header spans all rows (ie as
> a 'title').
> >
> > My code is:
> > $table = new HTML_Table('border=1 align=center
> caption="Existing Promotions"');
> > $table->addRow(array('Existing Promotions'),
> > "colspan=7",
> "TH");
>
> try:
>
> $table->setCellContents(0,0,'Existing Promotions', "th");
> $table->setCellAttributes(0,0,'colspan="7"');
No, that was one of the variations that I tried.
It is recognising 'colspan', but just doesn't output it into the HTML. Look at the
HTML
that is generated:
<table border="1" align="center" caption="Existing
Promotions">
<tr>
<th align="center">Existing Promotions</th>
<!-- span -->
<!-- span -->
<!-- span -->
<!-- span -->
<!-- span -->
<!-- span -->
</tr>
<tr>
<th align="center">Promo</th>
<th>Start</th>
<th>End</th>
<th align="right">Save</th>
<th align="right">Qty</th>
<th>Description</th>
<th align="center">Number<br>of SKUs</th>
</tr>
--
Alain Williams
#include <std_disclaimer.h>
FATHERS-4-JUSTICE - Campaigning for equal rights for parents and the
best interests of our children. See http://www.fathers-4-justice.org