title: Replace specific string in HTML file with PHP
body: <p>I got this little problem here with my website. I want to replace a string in one of my html file. I did a php file that find the specific string and replace it but it become useless become the string to change is not the same after...</p>
  
  <p>In my HTML file, I'm able to change <code>7NT0j5dB2QMyWv96nXIDgaR4PJ</code> for whatever random string the PHP file generate</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;Secret Key&lt;/td&gt;
  &lt;td&gt;&lt;strong style="color:#b94a48;"&gt;7NT0j5dB2QMyWv96nXIDgaR4PJ&lt;/strong&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>But in my PHP file the string to replace still <code>7NT0j5dB2QMyWv96nXIDgaR4PJ</code> not the new one...</p>
  
  <p>There is my php code :</p>
  
  <pre><code>$contents = file_get_contents ("step-second-test.php");
  
  $contents = str_replace(array("7NT0j5dB2QMyWv96nXIDgaR4PJ"), generateRandomString($length = 26), $contents);
  file_put_contents("step-second-test.php", $contents);
  </code></pre>