Re: Re: Yet another question
| From: | user at domain dot invalid | Date: | Thu, 31 Oct 2002 08:00:10 +0000 |
| Subject: | Re: Re: Yet another question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122210@lists.php.net to get a copy of this message | ||
Besides that there is no reason to include the file after the use of the variable. When i started writing php i saw in every other program that the include was the first line in every function that needs it.
Like :
function test() {
include("file");
.....
....
Peter Houchin wrote:
try it and see .. though I am pretty sure that it won't work unless you define the variable else where in the file b4 calling it. other wise the variable will either be blank or give you an error saying undefined variable if it's used before the include.-----Original Message----- From: Trasca Ion-Catalin [mailto:tic2000@home.ro] Sent: Thursday, 31 October 2002 10:56 AM To: php-general@lists.php.net Subject: [PHP] Re: Yet another question Yes, this works, but only if I include the file before the use of the variable, but, what if I use the include() after the use of the variable? -- Trasca Ion-Catalin "Tjoumaidis" <ttjoumlists@freemail.gr> wrote in message news:3DBF8DE6.70701@freemail.gr...Yes if you include the file include ("file"); then you can refer to any of the variables the file contains Trasca Ion-Catalin wrote:-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpIt's posible to call a variable from another file? -- Trasca Ion-Catalin