title: Assigning a variable equal to Include function content
body: <p>This issue came up to me in vBulletin system. i want to build a block in sidebar area to help me autmate some daily works.. i wrote php code like this :</p>
  
  <pre><code>&lt;?php
      $myDay = date('D');
      $myHour = date('G');
      // Saturday
      if ($myDay == "Sat") {
          if ($myHour &gt;= 7) {
              $output = include('textFilePath/saturday.txt');
          } else {
              $output = include('textFilePath/friday.txt');
          }
      }
      // Sunday
      if ($myDay == "Sun") {
          if ($myHour &gt;= 7) {
              $output = include('textFilePath/sunday.txt');
          } else {
              $output = include('textFilePath/saturday.txt');
          }
      }
      // and it goes on to friday...
      // and in the end :
      return $output;
  ?&gt;
  </code></pre>
  
  <p>my problem is with include() function . when i return the $output value it returns a boolean(0 or 1) and include function writes out the txt files content in the beginning of document instead of "sidebar block"
  i know i can echo the actual content instead of using include and txt files. but as i said i want to automate the daily tasks and give the users access to edit the txt files.</p>
  
  <p>is there any other technique or function to assign the content of a local file to a variable ?</p>