<i id='6k3zj'><tr id='6k3zj'><dt id='6k3zj'><q id='6k3zj'><span id='6k3zj'><b id='6k3zj'><form id='6k3zj'><ins id='6k3zj'></ins><ul id='6k3zj'></ul><sub id='6k3zj'></sub></form><legend id='6k3zj'></legend><bdo id='6k3zj'><pre id='6k3zj'><center id='6k3zj'></center></pre></bdo></b><th id='6k3zj'></th></span></q></dt></tr></i><div id='6k3zj'><tfoot id='6k3zj'></tfoot><dl id='6k3zj'><fieldset id='6k3zj'></fieldset></dl></div>

    <small id='6k3zj'></small><noframes id='6k3zj'>

      <bdo id='6k3zj'></bdo><ul id='6k3zj'></ul>
  1. <legend id='6k3zj'><style id='6k3zj'><dir id='6k3zj'><q id='6k3zj'></q></dir></style></legend>

      <tfoot id='6k3zj'></tfoot>

    1. php脚本中的双引号echo

      Double quotes within php script echo(php脚本中的双引号echo)
        <tbody id='dAleh'></tbody>

        <i id='dAleh'><tr id='dAleh'><dt id='dAleh'><q id='dAleh'><span id='dAleh'><b id='dAleh'><form id='dAleh'><ins id='dAleh'></ins><ul id='dAleh'></ul><sub id='dAleh'></sub></form><legend id='dAleh'></legend><bdo id='dAleh'><pre id='dAleh'><center id='dAleh'></center></pre></bdo></b><th id='dAleh'></th></span></q></dt></tr></i><div id='dAleh'><tfoot id='dAleh'></tfoot><dl id='dAleh'><fieldset id='dAleh'></fieldset></dl></div>

          <small id='dAleh'></small><noframes id='dAleh'>

            <bdo id='dAleh'></bdo><ul id='dAleh'></ul>

              • <legend id='dAleh'><style id='dAleh'><dir id='dAleh'><q id='dAleh'></q></dir></style></legend>
                <tfoot id='dAleh'></tfoot>
                本文介绍了php脚本中的双引号echo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一行 php 代码,如下所示:

                I have a line of php code that looks like this:

                echo "<script>$('#edit_errors').html('<h3><em>Please Correct Errors Before Proceeding</em></h3>')</script>";
                

                我想知道如何正确地为文本添加字体颜色.如果我这样做:

                I would like to know how to add a font color to the text correctly. If I do this:

                echo "<script>$('#edit_errors').html('<h3><em><font color="red">Please Correct Errors Before Proceeding</font></em></h3>')</script>";
                

                red"这个词是黑色的,编译器会报错.

                The word "red" is in black text and the compiler throws an error.

                如果我在红色周围使用单引号,则文本根本不会显示.

                If I use single quotes around red, then the text does not show up at all.

                任何帮助都会很棒.谢谢

                Any help would be great. Thanks

                推荐答案

                你需要转义 ",所以它不会被解释为字符串的结尾.使用 逃避它:

                You need to escape ", so it won't be interpreted as end of string. Use to escape it:

                echo "<script>$('#edit_errors').html('<h3><em><font color="red">Please Correct Errors Before Proceeding</font></em></h3>')</script>";
                

                阅读更多:字符串 和 转义序列

                这篇关于php脚本中的双引号echo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How do I pass parameters into a PHP script through a webpage?(如何通过网页将参数传递给 PHP 脚本?)
                PHP - include a php file and also send query parameters(PHP - 包含一个 php 文件并发送查询参数)
                Where can I read about conditionals done with quot;?quot; and quot;:quot; (colon)?(我在哪里可以阅读有关使用“?完成的条件的信息?和“:(冒号)?)
                Accessing arrays whitout quoting the key(在不引用键的情况下访问数组)
                What is the name for the quot;lt;lt;lt;quot; operator?(“lt;lt;lt;的名字是什么?操作员?)
                default as first option in switch statement?(默认为 switch 语句中的第一个选项?)

                  <i id='KFwsk'><tr id='KFwsk'><dt id='KFwsk'><q id='KFwsk'><span id='KFwsk'><b id='KFwsk'><form id='KFwsk'><ins id='KFwsk'></ins><ul id='KFwsk'></ul><sub id='KFwsk'></sub></form><legend id='KFwsk'></legend><bdo id='KFwsk'><pre id='KFwsk'><center id='KFwsk'></center></pre></bdo></b><th id='KFwsk'></th></span></q></dt></tr></i><div id='KFwsk'><tfoot id='KFwsk'></tfoot><dl id='KFwsk'><fieldset id='KFwsk'></fieldset></dl></div>

                  <small id='KFwsk'></small><noframes id='KFwsk'>

                  <legend id='KFwsk'><style id='KFwsk'><dir id='KFwsk'><q id='KFwsk'></q></dir></style></legend><tfoot id='KFwsk'></tfoot>
                    <bdo id='KFwsk'></bdo><ul id='KFwsk'></ul>

                            <tbody id='KFwsk'></tbody>