Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Echo a large block of text
    primarykey
    data
    text
    <p>Im new to PHP and I can't figure out what the rules are for using the echo function. For example, if I need to echo a large block of css/js, do I need to add echo to each line of text or is there a way to echo a large block of code with a single echo?</p> <p>When I try to echo a big block of code like this one, I get an error: </p> <pre><code>if (is_single()) { echo '&lt;link type="text/css" rel="stylesheet" href="http://jotform.com/css/styles/form.css"/&gt;&lt;style type="text/css"&gt; .form-label{ width:150px !important; } .form-label-left{ width:150px !important; } .form-line{ padding:10px; } .form-label-right{ width:150px !important; } body, html{ margin:0; padding:0; background:false; } .form-all{ margin:0px auto; padding-top:20px; width:650px !important; color:Black; font-family:Verdana; font-size:12px; } &lt;/style&gt; &lt;link href="http://jotform.com/css/calendarview.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="http://jotform.com/js/prototype.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://jotform.com/js/protoplus.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://jotform.com/js/protoplus-ui.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://jotform.com/js/jotform.js?v3" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://jotform.com/js/location.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://jotform.com/js/calendarview.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; JotForm.init(function(){ $('input_6').hint('ex: myname@example.com'); }); &lt;/script&gt;'; }else { } </code></pre> <p>Is there a better way to echo large blocks of code without a lot of work (adding echo to each line for example)?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload