title: deal with big arrays in php
body: <p>In the application i am developing I need to get information from varoius sources (mysql database,facebook and in future other social networks.) and join all in the same structure,</p>
  
  <p>What i am doing right now is get the data from my database and from facebook as array, then use array_merge to join both arrays and then iterate over that array and create a custom array formatted with the fields I want. </p>
  
  <p>The strucutre itself is working but I fear that with increasing number of posts into my app and the associated facebook page will make my application really slow.
  I am only showing 10 records at the time (using array_slice) but before that I allways need to get all the data, and because, it comes from different sources with different formats, I dont see any way to limit the ammount of data returned from each call.</p>
  
  <p>Any tips?</p>