PEAR Manual
Prev |  | Next

# HTML_Table::addRow

HTML_Table::addRow -- Add row

## Synopsis

    require_once "HTML/Table.php";

``int HTML_Table::addRow` ([array $contents = `NULL` [, mixed $attributes = `NULL` [, string $type='TD' [, boolean $inTR = `FALSE`]]]])`

## Description

Adds a table row and returns the row identifier

## Parameter

- `array $contents` - Must be an indexed array of valid cell contents

- `mixed $attributes` - Associative array or string of table row attributes. This can also be an array of attributes, in which case the attributes will be repeated in a loop.

- `string $type` - Cell type either `'th'` or `'td'`

- `boolean $inTR` - `FALSE`, if attributes are to be applied in `TD` tags; `TRUE`, if attributes are to be applied in `TR` tag

## Return value

`int` - the row identifier

## Note

This function can not be called statically.

## See

HTML_Table::addCol()

Prev | Home | Next
HTML_Table::addCol | Up | HTML_Table::altRowAttributes