title: Save arrays strategy in PHP
body: <p>I came to this issues recently where I have to decide if I save a list of arrays all in one file or keep it in separeted files.</p>
  
  <p>Here's the deal. I have an array of arrays, I'll simplify the example:</p>
  
  <pre><code>countries['america'] = array('chile', 'brazil', 'usa');
  countries['europe'] = array('france', 'italy', 'spain');
  ...and so.
  </code></pre>
  
  <p>So, I could save all the arrays in one big file (name it 'world'), and whenever I'll have to query a country in a continent I'll load all the file in memory.</p>
  
  <p>Or, I could save each array in a different file (name it 'america', 'europe', etc), and whenever I'll have to query a country in a continent I'll load the corresponding file.</p>
  
  <p>I know it all comes to sizes, so imagine the world has 10 continents and each continent has 2000 countries.</p>
  
  <p>What is the best approach?</p>
  
  <p>Note: this is a performance issue and I prefer to avoid calling a database.</p>