Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
22.phpt: thead, tfoot, tbody and addCol
3
--FILE--
4
<?php
5
// $Id: 22.phpt 297540 2010-04-05 19:58:39Z wiesemann $
6
require_once 'HTML/Table.php';
7
$table = new HTML_Table();
8
 
9
$thead =& $table->getHeader();
10
$tfoot =& $table->getFooter();
11
$tbody =& $table->getBody();
12
 
13
$data[0][] = 'Test';
14
$data[1][] = 'Test';
15
 
16
foreach($data as $key => $value) {
17
    $thead->addCol($value);
18
    $tfoot->addCol($value);
19
    $tbody->addCol($value);
20
}
21
 
22
// output
23
echo $table->toHTML();
24
?>
25
--EXPECT--
26
<table>
27
	<thead>
28
		<tr>
29
			<td>Test</td>
30
			<td>Test</td>
31
		</tr>
32
	</thead>
33
	<tfoot>
34
		<tr>
35
			<td>Test</td>
36
			<td>Test</td>
37
		</tr>
38
	</tfoot>
39
	<tbody>
40
		<tr>
41
			<td>Test</td>
42
			<td>Test</td>
43
		</tr>
44
	</tbody>
45
</table>