title: How to escape new line from string
body: <p>is there any php method to remove new line char from string?</p>
  
  <pre><code>$str ="
  Hi
  there
  ";
  </code></pre>
  
  <p>my string contains a new line char between 'Hi' and 'there'
  i want output as a "Hi there".I don't want to use regular expression.</p>