class JoinAddrs function JoinAddrs key include lib addrs_nwtypes php f

 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
<?
class JoinAddrs {
function JoinAddrs($key) {
include("lib/addrs_nwtypes.php");
foreach ($ADDRS as $k=>$v) {
if ($k[0]==$key[0]) {
$this->ADDRS=$v;
}
}
}
function show() {
foreach ($this->ADDRS as $d=>$v) {
echo "<b>$d</b><ul>";
ksort($v);
foreach ($v as $s=>$hs) {
$fhs = array();
foreach ($hs as $p) {
$fhs[] = sprintf("<span class=join>%s</span>",$p["house"]);
}
printf("<li>%s: %s</li>", $s, join(", ",$fhs ));
}
echo "</ul>";
}
}
}
$jad = new JoinAddrs($jumi[0]);
$jad->show();
?>