天空是藍色的

          做好軟件為中國 #gcc -c helloworld.c -o helloworld.o //編譯目標文件 #gcc helloworld.o -o helloworld //編譯成可執行exe #helloworld //運行exe
          數據加載中……
          記一段代碼[PHP]迭代讀取數據庫


          <style>

          input, select {
          ?font-size: 14px;
          ?color: #333333;
          ?padding-left:3px;
          ?background:#f6f6f6;
          ?border: #CCCCCC 1px solid;}
          </style>
          <?php
          require_once dirname(__FILE__) ."/headers.php";

          $i = 0;
          ??

          function category($category_parent_timestamp){
          ???global $db;
          ???global $i;
          ???$result = $db->get("{category_parent_timestamp} == " . $category_parent_timestamp,null,"categories",false,"category_time","desc");
          ???sort($result);
          ??
          ???for($index=0;$index<count($result);$index++){??????????
          ?????echo "<option>";
          ?????for($x=0;$x<$i;$x++){
          ???????echo "--";
          ??????}??????
          ?????echo $result[$index]['category_title'];
          ?????echo "&nbsp;";??
          ?????$sub = $db->get("{category_parent_timestamp} == " .$result[$index]['category_timestamp'],null,"categories",false,"category_time","desc");
          ?????if(count($sub)!=0){
          ???????$i++;
          ???????category($result[$index]['category_timestamp']);//迭代??????
          ???????$i--;
          ?????}
          ?????echo "</option>";
          ???}
          ???
          }????
          ?
          echo "<select>";
          category("0");?
          echo"</select>";
          ?>

          posted on 2006-06-23 00:09 bluesky 閱讀(2962) 評論(2)  編輯  收藏 所屬分類: PHP

          評論

          # re: 記一段代碼[PHP]迭代讀取數據庫 2006-07-03 04:49 阿亮

          這么多全都要么?還是什么?復制好后把代碼放到哪了又要應該注意哪些問題的?
          謝謝回答我的菜問題!
            回復  更多評論    

          # re: 記一段代碼[PHP]迭代讀取數據庫 2016-06-14 15:01 http://www.calvin-studio.fr

          請賜教!非常感激!
            回復  更多評論    
          主站蜘蛛池模板: 湄潭县| 花莲市| 汽车| 广饶县| 宁津县| 沈阳市| 大邑县| 台北市| 滨海县| 吴桥县| 揭阳市| 茂名市| 调兵山市| 浦东新区| 济南市| 莒南县| 双桥区| 巴塘县| 赫章县| 玛沁县| 榕江县| 天门市| 富锦市| 五家渠市| 泽州县| 广州市| 瑞昌市| 兰州市| 南丰县| 疏附县| 肥城市| 都兰县| 闸北区| 樟树市| 江川县| 曲水县| 丘北县| 夏河县| 永济市| 怀来县| 玉田县|