title: Search and replace entire directory file contents
body: <p>I need to re-write multiple files in a single directory based on the contents of a single CSV file. </p>
  
  <p>For example the CSV file would contain something like this:</p>
  
  <pre><code>define("LANG_BLABLA", "NEW");
  </code></pre>
  
  <p>In one of the files in the directory it would contain this:</p>
  
  <pre><code>define("LANG_BLABLA", "OLD");
  </code></pre>
  
  <p>The script will search through the directory and any occurrences where the CSV "LANG_BLABLA" matches the old directory LANG it will update the "OLD" with the "NEW"</p>
  
  <p>My question is how exactly can I list the contents of the files in the directory in 1 array so I can easily search through them and replace where necessary. </p>
  
  <p>Thanks.</p>