title: PHP include_once or require_once in a loop
body: <p>Quick question about include/requre_once . I have some code that is common to a few pages that I feel would be better to be in a file to call from each page rather than code repetition.</p>
  
  <p>I call the include_once in a while loop and what I noticed is that I have to use include('file.php') or it will literally load it (and display it) only once . I guess what I assumed ( incorrectly) is that it will load it on the first loop and retain the code in a cache to avoid having to access the disk each iteration of the loop. </p>
  
  <p>I looked around for a "load_once_and_cache" type of command but did not find anything. </p>
  
  <p>Does anyone have any suggestions for this or is putting the code in each page the only option.</p>
  
  <p>Thanks again!</p>