Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
16.phpt: 2 row 2 column, setCaption
3
--FILE--
4
<?php
5
// $Id: 16.phpt 297540 2010-04-05 19:58:39Z wiesemann $
6
require_once 'HTML/Table.php';
7
$table = new HTML_Table('width="400"');
8
 
9
$data[0][] = 'Test';
10
$data[0][] = 'Test';
11
$data[1][] = 'Test';
12
$data[1][] = 'Test';
13
 
14
foreach($data as $key => $value) {
15
    $table->addRow($value, 'bgcolor = "yellow" align = "right"');
16
}
17
 
18
$table->setCaption('Foobar', 'bgcolor="green"');
19
 
20
// output
21
echo $table->toHTML();
22
?>
23
--EXPECT--
24
<table width="400">
25
	<caption bgcolor="green">Foobar</caption>
26
	<tr>
27
		<td bgcolor="yellow" align="right">Test</td>
28
		<td bgcolor="yellow" align="right">Test</td>
29
	</tr>
30
	<tr>
31
		<td bgcolor="yellow" align="right">Test</td>
32
		<td bgcolor="yellow" align="right">Test</td>
33
	</tr>
34
</table>