Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML / PHP - Textarea shows tabs / spaces from code
    text
    copied!<p>For readability reasons , I have a code that looks like this :</p> <pre><code> &lt;textarea cols="50" rows="5" id="k99_brsa_settings[brsa_keep_settings_exp]" name="k99_brsa_settings[brsa_keep_settings_exp]" /&gt; &lt;?php echo $export; ?&gt; &lt;/textarea&gt; </code></pre> <p>I do not know how to represent / display <code>tabs</code> here , but it is actually like so :</p> <pre><code>[TAB][TAB][TAB][TAB]&lt;textarea cols="50" rows="5" id="k99_brsa_settings[brsa_keep_settings_exp]" name="k99_brsa_settings[brsa_keep_settings_exp]" /&gt; [TAB][TAB][TAB][TAB][TAB]&lt;?php echo $export; ?&gt; [TAB][TAB][TAB][TAB]&lt;/textarea&gt; </code></pre> <p>or better yet with an image ( code editor ) :</p> <p><img src="https://i.stack.imgur.com/bOVq4.jpg" alt="Code tabs in editor"></p> <p>The problem is , that those tabs appear in the Output like so :</p> <p><img src="https://i.stack.imgur.com/L60Tq.jpg" alt="Tabs appear in textarea"></p> <p>and since those are DB entries, when I save , it actually CHANGES the entry (adds tabs and spaces )</p> <p>I know that when I change the code to a <code>one liner</code>:</p> <pre><code>&lt;textarea cols="50" rows="5" id="k99_brsa_settings[brsa_keep_settings_exp]" name="k99_brsa_settings[brsa_keep_settings_exp]" /&gt;&lt;?php echo $export; ?&gt;&lt;/textarea&gt; </code></pre> <p>(image from code editor below )</p> <p><img src="https://i.stack.imgur.com/JRvrl.jpg" alt="Image with one liner"></p> <p>...there is no problem and no tabs / spaces .</p> <p>Is there any way to keep the tabs for readability AND eliminating those output tabs and spaces ? Does the <code>&lt;textarea&gt;</code> TAGS always HAVE to end after the output without spaces </p>
 

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