title: how change part of url by preg_replace?
body: <p>I am trying to change all the links of a html with php preg_replace. All the uris have the following form</p>
  
  <pre><code>test.com/item/16
  </code></pre>
  
  <p>I want to change it to:</p>
  
  <pre><code>test.com/z/item/16
  </code></pre>
  
  <p>I tried the following, but it returns no changes:</p>
  
  <pre><code>$links = 'http://test.com/item/16';
  preg_replace("/item","z/item",$links);
  
  echo $links; 
  // output &gt;&gt;&gt; http://test.com/z/item/16
  </code></pre>