Find and Replace a string in more than one text file in PHP
<p>i found this code:</p>

<pre><code>&lt;?php
$path_to_file = 'c:\wamp\www\FindReplace\File.txt';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("Paul",",HHH",$file_contents);
file_put_contents($path_to_file,$file_contents);
?&gt;
</code></pre>

<p>It's working very well if it's only one file but how to do if i want to Find and Replace in all *.txt file of my folder?</p>

<p>THank you</p>
