title: function return content as string from a require
body: <p>Is there a way I can return the require as a string?</p>
  
  <p>The view_users contains an HTML and PHP code and it is likely being parse then I want to return the parse version of it as a string. </p>
  
  <p>Class Users</p>
  
  <pre><code>class Users{ 
  
      public function viewUsers(){  
                 $userData;
             require  $path."view_users.php"; 
      }
  
  }
  </code></pre>
  
  <p><em><strong>index.php</em></strong></p>
  
  <pre><code>include_once(dpath. "/users.php");  
  $users= new Users();
  
  function wrap_contents($content = ""){
      echo'&lt;div class="wrap"&gt;';
      echo $content;
      echo '&lt;/div&gt;';
  }
  
  
  wrap_contents($users-&gt;viewUsers());
  </code></pre>