一个简单的for循环:
<?php$resultsTicket = $mysqli->query("SELECt * FROM order_history WHERe member_name = '$member_name' ORDER BY id ASC");if ($resultsTicket > 0) { while($obj = $resultsTicket->fetch_object()) { ?> <tr> <select name="quantity" required> <option value="">Choose Quantity</option> <?php for ($q = 1; $q <= $obj->quantity; $q++) { ?><option value="<?=$q?>">Quantity <?=$q?></option> <?php } ?> </select> </tr><?php } %>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)