How can I replace multiple PHP files in different directories with an updated PHP file using PHP
<p>How can I replace multiple PHP files in different directories with the same PHP file using PHP for example, How do I replace all the <code>index.php</code> files in Example 1 with the <code>index.php</code> file in Example 2</p>

<p>Example 1 url values</p>

<pre><code>/files/user-2/a/index.php
/files/user-12/a/index.php
/files/user-23/a/index.php
/files/user-232/a/index.php
/files/user-2232/a/index.php
</code></pre>

<p>Example 2 url values</p>

<pre><code>/files/user-2/a/index.php
/files/user-12/a/index.php
/files/user-23/a/index.php
/files/user-232/a/index.php
/files/user-2232/a/index.php
</code></pre>
