title: How to echo output in one line?
body: <p>I have a script, and it working fine. However the output is in multiple lines. How can I fix this to output into a single line?</p>
  
  <pre><code> &lt;?php
   $filename1 = './workspace/vars1.txt';
   $contents1 = file($filename1);
   foreach ($contents1 as $line1) {
       $str1 = " &lt;TR&gt;&lt;TD&gt;$line1:&lt;/TD&gt;&lt;TD&gt; &lt;input type=\"text\"name \"$line1\" " ;
       echo $str1;
       fwrite($file, $str1);
   }
   fclose($file);
   ?&gt;
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>&lt;TR&gt;&lt;TD&gt;ID
  :&lt;/TD&gt;&lt;TD&gt; &lt;input type="text"name="ID
  "  &lt;TR&gt;&lt;TD&gt;APP
  :&lt;/TD&gt;&lt;TD&gt; &lt;input type="text"name="APP
  " 
  </code></pre>
  
  <p>The output should be:</p>
  
  <pre><code>&lt;TR&gt;&lt;TD&gt;ID:&lt;/TD&gt;&lt;TD&gt; &lt;input type="text"name="ID"  &lt;TR&gt;&lt;TD&gt;APP:&lt;/TD&gt;&lt;TD&gt; &lt;input type="text"name="APP" 
  </code></pre>