forked from stank2010/php_function
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
41 lines (34 loc) · 695 Bytes
/
example.php
File metadata and controls
41 lines (34 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
include "html_function.php";
$A = array("name","class","talk","detail");
$data_1 = array("stank","p1","hello","-");
$data_2 = array("bear","p2","hong hong","animal");
function each_all($tag='',$arr=array())
{
foreach($arr as $a)
{
echo '<'.$tag.'>';
echo $a;
echo '</'.$tag.'>';
}
}
h_html();
h_body();
h_print('table<br>');
h_table('border="1"');
foreach($A as $a)
{
h_th();
h_print($a);
h_th_end();
}
h_tr();
each_all('td',$data_1);
h_tr_end();
h_tr();
each_all('td',$data_2);
h_tr_end();
h_table_end();
h_body_end();
h_html_end();
?>