|
Posted by Bruno Barros on 09/29/07 13:49
On 29 Sep, 13:23, howa <howac...@gmail.com> wrote:
> Hello,
>
> I have a function, e.g.
>
> function foo() {
> include("bar.php");
>
> }
>
> and the bar.php contain contents e.g.
>
> $global_v1 = "abc";
> $global_v2 = "def";
>
> I want to execute function foo(), but at the same time, let the
> variables declared in bar.php to have global scopem is it possible?
>
> Thanks.
function foo() {
global $global_v1;
global $global_v2;
include "bar.php";
}
Good enough?
---
Bruno Rafael Moreira de Barros
Adobe Photoshop CS2 and CS3
-
XML / XSLT
-
MySQL / SQLite / TerraDB
-
PHP 3, 4, 5 and 6
:: Looking For A Permanent Job ::
---
[Back to original message]
|