How to remove one instance of one string in PHP?
<p>I have a open source editor on the cms that I am making that automatically inserts a </p>

<pre><code>&lt;br /&gt;
</code></pre>

<p>tag at the beginning of the post it submits to the database. This makes validation a pain, since even though there is no real text being submitted, the form still accepts the break tag as input and prevents the "Please enter some text" error from showing.</p>

<p>So I tried to remove the opening break tag by filtering my input like this:</p>

<pre><code>substr($_POST['content'], 6);
</code></pre>

<p>This works as long as the user doesn't press the backspace a couple of times which removes the break tag in which case the first 8 characters of the post gets removed even if they are not a break tag.</p>

<p>So how can I remove the first 6 characters of the input ONLY if those first 6 characters are composed of the break tag. Also I don't want to remove all break tags, only the one at the very beginning of the post.</p>
