Re: including an html file!!
| From: | Johan Holst Nielsen | Date: | Sun, 30 May 2004 14:05:11 +0000 |
| Subject: | Re: including an html file!! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187230@lists.php.net to get a copy of this message | ||
Godfoca wrote:
echo returns 1 on success, so the interpreter first evaluates the expression inside the echo() call, and thus includes the html file, and then, as the evaluation returned 1, it echoes 1 to the final file.Just to clear it out... include does not always return 1. An example File: includeFile.php <?php $foo = "Test with return"; return $foo; ?> <?php $bar = include("includeFile.php"); echo $bar; //Output "Test with return" ?> -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk