title: urlencode in preg_replace
body: <pre><code>$str = preg_replace("'\(look: (.{1,80})\)'Ui",
               "(look: &lt;a href=\"dict.php?process=word&amp;q=\\1\"&gt;\\1&lt;/a&gt;)",$str);
  </code></pre>
  
  <p>i want to encode url, but how can I do that?</p>
  
  <p>can i use urlencode() function in preg_replace?, something like that,</p>
  
  <pre><code>$str = preg_replace("'\(look: (.{1,80})\)'Ui",
              "(look: &lt;a href=\"dict.php?process=word&amp;q=\\1\"&gt;\\1&lt;/a&gt;)",$str);
  </code></pre>
  
  <p>do you have any idea about encoding url in preg_replace?</p>