Re: include()ing into a variable
| From: | Simas Toleikis | Date: | Thu, 14 Oct 2004 20:03:36 +0000 |
| Subject: | Re: include()ing into a variable | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199520@lists.php.net to get a copy of this message | ||
ApexEleven wrote:
I believe that include() returns true|false, so $a would equal true if the file is included and false if it is not. If you use *return* on global scope in include file that value will be returned to $a.-- test.php -- $test = "Hello"; return $test; ----- $a = include "test.php"; // $a is "Hello" now