【问题标题】:Alternative of using <br> in several lines [duplicate]在多行中使用 <br> 的替代方法[重复]
【发布时间】:2016-02-08 07:26:32
【问题描述】:

我需要在我的网站上复制和粘贴几个代码,但我做不到。我的做法需要更多时间。有没有其他方法可以以更简单的方式做到这一点?我只需要在每一行中插入&lt;br&gt; 的替代方法。我正在做的是:在每一行中插入&lt;br&gt;

    <br>$db = new mysqli("localhost", "root","","learndb");
    <br>$stmt = $db->prepare("select * from admin where username = ?");
    <br>$stmt->bind_param("s",$first);
    <br>$stmt->execute();
    <br>$result=$stmt->get_result();    
    <br>$myrow=$result->fetch_assoc();

【问题讨论】:

标签: php html css


【解决方案1】:

您可以在 php 回显中使用 \r\n

看到这个帖子:PHP - how to create a newline character?

【讨论】:

    【解决方案2】:

    您可以使用 \r \n....echo '\r'

    【讨论】:

      猜你喜欢
      • 2019-02-28
      • 1970-01-01
      • 2010-12-24
      • 2023-03-07
      • 1970-01-01
      • 2013-02-09
      • 2021-09-12
      • 2015-05-30
      • 1970-01-01
      相关资源
      最近更新 更多