duanchu0031
duanchu0031
2014-02-11 12:46

while循环选择选项继续循环[关闭]

  • php

HI everyone i have a problem this is the result

This is my codes.

$iqry2 = $mysqli->prepare("SELECT itemname,unitmeasure FROM table_item");

    $iqry2->execute();
    $iqry2->bind_result($itemname,$unitmeasure);
    $iqry2->store_result();


    <div class="form-group ">
    <label for="itemname" class="control-label col-lg-2">Item Name</label>
    <div class="col-lg-10">


    <select name="iname" class="form-control">

    <?php

    while ($iqry2->fetch()){

    echo "<option>$itemname</option>";

    ?>
    </select>


    </div>
    </div>


    <select name="unit" class="form-control">

    <?php

    echo  "<option>$brandname</option>";

    }

    ?>
    </select>
    </div>
    </div>
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答