06-11-2009, 09:29 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 64
Thanks: 1
|
$content = include('file2include.php');
Well I tried something funny some days ago - include a file with include and put it in a variable
file2include.php
PHP Code:
<table>
<tr><td><?php echo 'hello world' ?></td></tr>
</table>
now I include that file like:
PHP Code:
<?php
$content = include('file2include.php');
echo $content;
?>
Now what I get in the Browser is:
HTML Code:
<table>
<tr><td>Hello World</td></tr>
</table>1
Now I wondered where that 1 comes from? Is it a true which comes since the file was successfully included - and get's converted to a 1?
(This thread is not about - if we should use something like that above or not  )
|
|
|
|