How to make preg_replace have count function for number of replaces count?
<p>I have creted a preg_replace script but now i want to add count function in it!</p>

<p>MY CODE</p>

<pre><code>$replace = 'ISO Burning Programs/Active@ ISO Burner 2.1.0.0/SPTDinst-v162-x86.exe';
$result=preg_replace('/[^0-9^A-Z^a-z-*… ,;_!@.{}#&lt;&gt;""=-^:()\[\]]/', '&lt;br/&gt;', $replace);
echo $result;
</code></pre>

<p>OUTPUT</p>

<pre><code>ISO Burning Programs
Active@ ISO Burner 2.1.0.0
SPTDinst-v162-x86.exe
</code></pre>

<p>But the output i want is-</p>

<pre><code>1 ISO Burning Programs
2 Active@ ISO Burner 2.1.0.0
3 SPTDinst-v162-x86.exe
</code></pre>

<p>Can anyone help me out?<br/>
Thanks in advance!!!!!!</p>
