doutao6380 2018-12-01 14:49
浏览 62
已采纳

有可能将一半的while循环放在一个php标签之间,另一半放在另一个php标签中,就像我在那里展示的那样?

Is this possible to do? For example the bracket that close the while is in different php tags of the ones that start the while loop.

while ($row = $result->fetch_assoc()) {
    $code = $row["VAT"];
?>
<option name="Client VAT" value="<?php echo($code); ?>"><?php echo $code; ?></option>
<?php
}
?>
  • 写回答

1条回答 默认 最新

  • donglou1866 2018-12-01 14:51
    关注

    In a word - yes. PHP will continue the parsing of the PHP code in the next <?php tag without an issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员