1 <?php 2 include("mydbda.php"); 3 $db = new mydbda(); 4 echo "<div>"; 5 6 $sqlzm = "select distinct(First) from area"; 7 $strzm = $db->Select($sqlzm,"CX","mydb"); 8 9 $attrzm = explode("|",$strzm); 10 11 for($i=0;$i<count($attrzm);$i++) 12 { 13 14 $sqlcs = "select name from area where first=‘".$attrzm[$i]."‘"; 15 16 $strcs = $db->Select($sqlcs,"CX","mydb"); 17 18 $attrcs = explode("|",$strcs); 19 echo "<div><table><tr><td>$attrzm[$i]</td>"; 20 21 for($j=0;$j<count($attrcs);$j++) 22 { 23 echo "<td>$attrcs[$j]</td>"; 24 25 } 26 echo "</td></tr></table></div>"; 27 } 28 29 echo "</div>"; 30 31 ?> 32 33 </body> 34 35 </html>
时间: 2024-11-02 20:12:28