title: preg_replace not working or am I doing it wrong?
body: <p>I have this as part of a <code>preg_replace</code> array</p>
  
  <pre><code>// CENTER ITEMS
  $pattern[5] = '/\[center\](.*?)\[\/center\]/i';
  $replace[5] = "&lt;div class=\"centerText\"&gt;$1&lt;/div&gt;";
  </code></pre>
  
  <p>It works as long as whatever it is finding is like</p>
  
  <p><code>[center]lol[/center]</code></p>
  
  <p>But if the text is like</p>
  
  <p><code>[center]hello</code></p>
  
  <p><code>my name is steve</code>
  <code>[/center]</code></p>
  
  <p>It does not work how can I solve this? </p>
  
  <p>Thanks</p>