how to store output html to an var in php ?
how to set $a = require(xx.php)?
the xx.php outputs html , i want to store this html to a var , how to do?
please see my codes bellow:
a.php codes:
<?php
// a.php
echo 'hello world';
?>
b.php
<pre>
<?php
ob_start();
$a=require('a.php');
ob_clean();
echo $a; // get '1' but not 'hello world'
// can not post , why?
// can not post , why?
// can not post , why?
// can not post , why?
// can not post , why?
// can not post , why?
?>