Re: [PHP] Includes confusion

2003-04-04 Thread Ernest E Vogelsinger
At 22:24 04.04.2003, Mike Tuller said: [snip] >fine except inside functions. So if I have the following: > >include "/Library/WebServer/includes/database_connection.inc"; > >function list_search_results() >{ > // my code that lists search results >} > >

RE: [PHP] Includes confusion

2003-04-04 Thread Jennifer Goodie
PHP parses includes inline, so whatever the scope is where the file is included, is the scope of the variables that the include contains. You can declare the variables global in your fuction and it will use what was included, that would be the quick fix, you could also switch your include to use D