title: Unexpected "[" in line of code
body: <p>For some reason i'm getting an unexpected "[" in the below line of code. I'm not an expert at php so it could be something simple and i'm not seeing it.</p>
  
  <pre><code>&lt;span class=\"url\"&gt; ". ereg_replace("[","",$ads]['ad_url'][$idx]) ."&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;".$ads['ad_desc'][$idx] ."&lt;/div&gt; 
  </code></pre>
  
  <p>Thxs for the help in advance</p>
  
  <p>I'm now getting the error <strong>Parse error: syntax error, unexpected T_STRING</strong> after updating the a partial part of the code above to </p>
  
  <pre><code>preg_replace("/[/","",$ads['ad_url'][$idx])
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>EDIT:
  Here is the full updated code</p>
  
  <pre><code> &lt;span class=\"url\"&gt; ".a ereg_replace("\[","",$ads['ad_url'][$idx]) ."&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;".$ads['ad_desc'][$idx] .&lt;/div&gt;v&gt;
  </code></pre>