preg replace functions and http://?
<p>I am looking for a way to change this <code>array</code> for <code>preg_replace</code>.</p>

<pre><code>// URLS
$pattern[1] = '/\[url\=(.*?)\](.*?)\[\/url\]/i';
$replace[1] = "&lt;a href=\"http://$1\"&gt;$2&lt;/a&gt;";
// IMAGES
$pattern[2] = '/\[img\=(.*?)\]/i';
$replace[2] = "&lt;img src=\"http://$1\" alt=\"\" /&gt;";
</code></pre>

<p>So the if a user includes the <code>http://</code> it will not add it, and if the user doesn't add the <code>http://</code> it will add it.</p>

<p>Currently it only works if a user disregards the <code>http://</code></p>

<p>Thanks</p>

<p>Happy New Year!</p>
