How to replace carriage return
<p>I have a variable (<code>$myClass[0]-&gt;comment;</code>) that has carriage return in it. I want to replace all the carriage return in that variable with "<code>\n</code>"
how can I do that.<br>
below may help a bit    </p>

<pre><code>$myClass[0]-&gt;comment;    
</code></pre>

<p>Here is some output  </p>

<pre><code>&lt;?php  
          $test = explode(chr(13),$myClass[0]-&gt;comment );  
          var_dump($test);  

?&gt; 
</code></pre>

<p>OUTPUT    </p>

<pre><code>array  
  0 =&gt; string '12' (length=2)  
  1 =&gt; string '  
' (length=1)   
  2 =&gt; string '  
22' (length=3)  
</code></pre>

<p>All I want is <code>\n</code> instead of carriage return.</p>
