title: How to remove certain trailing characters in PHP?
body: <p>I'm trying to make a LaTeX parser in PHP, and I want to remove certain trailing new lines (<code>\\</code> signs).</p>
  
  <p>But the problem is, I only want to remove the new line (the double backslash) if it's before everything else.</p>
  
  <p>Like, I want to remove the first <code>\\</code> in the following example:</p>
  
  <pre><code>\\3+6=9
  </code></pre>
  
  <p>But not this <code>\\</code>:</p>
  
  <pre><code>3+\\6=9
  </code></pre>
  
  <p>How can I do this with PHP?</p>