$des = array(); $per = array(); $type = array_unique(search0(array("type"), array())["type"]); // print "t:".$tselect."<br>"; // print "d:".$dselect."<br>"; // print "p:".$pselect."<br>"; // print_r($_GET); if ($tselect == "") { $des = array_unique(search0(array("description"), array())["description"]); } else { $des = array_unique(search0(array("description"), array("type" => "{$tselect}"))["description"]); } if ($tselect == "" || $dselect == "") { $per = array_unique(search1(array("per"), array())["per"]); } else { $per = array_unique(search0_1(array("per"), array("type" => "{$tselect}", "description" => "{$dselect}"))["per"]); // print_r($per); if (!$per) { $p = array(); if ($tselect) { $p["type"] = $tselect; } if ($dselect) { $p["description"] = $dselect; } $result = search_print(array("*"), $p); $s .= "<form method='post' id='input' >"; // print_r($result); foreach ($result as $r) { foreach ($r as $a => $b) { $s .= "{$a}:<input type='text' value='{$b}' name='{$a}'>";
} else { $per = array($_POST["per"]); } // var_dump($per); foreach ($per as $p) { $item[] = array("type" => $t, "description" => $d, "per" => $p); } } } $item2 = array(); // print_r($item); if (isset($_POST["checkbox"])) { $cb = $_POST["checkbox"]; foreach ($item as $i) { $temp = array(); $a = search0_1($cb, array("type" => $i["type"], "description" => $i["description"], "per" => $i["per"])); foreach ($a as $b => $c) { $temp["{$b}"] = $c[0]; } $item2[] = array_merge($i, $temp); } // print_r($item2); } // print_r($item2); $k = "<table border='out' align='center'><tr>"; $row = $item2[0]; foreach ($row as $a => $b) { $k .= "<th>{$a}</th>"; } $k .= "</tr>"; foreach ($item2 as $i) {