4
<title>Embperl Examples - Dynamic Tables</title>
6
<body background="../images/jazzbkgd.gif">
8
<h1>Embperl Examples - Dynamic Tables</h1>
9
<hr><h3>This is a example of using the table tag to show the array @arr = ( 'A', 'B', 'C')</h3>
11
[- @arr = ( 'A', 'B', 'C') ; -]
14
<td> [+ $arr[$row] +] </td>
20
<hr><h3>This is a example of using the table tag in embperl to show the environement</h3>
24
<h4>Using $row (one value per row)</h4>
33
<td>[+ $i=$row +] </td>
34
<td>[+ $k[$row] +] </td>
35
<td>[+ $ENV{$k[$i]} +] </td>
40
<h4>Using $col (one value per column, only one row)</h4>
45
<td>[+ $i=$col +] </td>
46
<td>[+ $k[$col] +] </td>
47
<td>[+ $ENV{$k[$i]} +] </td>
52
<hr><h4>Using $cnt and $maxcol (three values per row)</h4>
57
<td>[+ $i=$cnt +] </td>
58
<td>[+ $k[$cnt] +] </td>
59
<td>[+ $ENV{$k[$i]} +] </td>
63
<hr><h3>Display an two dimensional array with one, two and three columns !</h3>
64
<h4>Please take a look at the source in your browser to see the difference</h4>
76
$a[[0][[0] = '1/1' ;<BR>
77
$a[[1][[0] = '2/1' ;<BR>
78
$a[[1][[1] = '2/2' ;<BR>
79
$a[[2][[0] = '3/1' ;<BR>
80
$a[[2][[1] = '3/2' ;<BR>
81
$a[[2][[2] = '3/3' ;<BR>
83
<h4>$tabmode = default </h4>
87
<td>[+ $a[$row][$col] +] </td>
92
<hr><h4>$tabmode=3 + 48 ; $maxcol = 4; $maxrow = 4 </h4>
93
[- $tabmode=3 + 48 ; $maxcol = 4; $maxrow = 4 -]
97
<td>[+ $a[$row][$col] +] </td>
101
<hr><h4> $tabmode=1 + 32 ; </h4>
102
[- $tabmode=1 + 32 ; -]
106
<td>[+ $a[$row][$col] +] </td>
112
<small>HTML::Embperl (c) 1997-1998 G.Richter</small>