Re: SV: SV: [PHP] Including files without loosing my string

2001-09-25 Thread David Robley
On Tue, 25 Sep 2001 17:46, Bård Tommy Nilsen wrote: > Can you write me an short example ?? > > > Bård Tommy Nilsen [About passing arguments to functions and global scoping] Declaring $id global: function doit() { global $id; echo $id; } $id = 1; doit(); output is 1 Passing $id as parameter:

SV: SV: [PHP] Including files without loosing my string

2001-09-25 Thread Bård Tommy Nilsen
Can you write me an short example ?? Bård Tommy Nilsen -Opprinnelig melding- Fra: David Robley [mailto:[EMAIL PROTECTED]] Sendt: 25. september 2001 10:11 Til: Bård Tommy Nilsen; [EMAIL PROTECTED] Emne: Re: SV: [PHP] Including files without loosing my string On Tue, 25 Sep 2001 17

Re: SV: [PHP] Including files without loosing my string

2001-09-25 Thread David Robley
On Tue, 25 Sep 2001 17:32, Bård Tommy Nilsen wrote: > Thats only if i call the index.php file first. > For that i have another solution > if (function_exists('func')) { > call_user_func ('func'); > } else { > include 'main.php'; > > But thats not the problem. > > I am using id in an sql query, but

SV: [PHP] Including files without loosing my string

2001-09-25 Thread Bård Tommy Nilsen
Thats only if i call the index.php file first. For that i have another solution if (function_exists('func')) { call_user_func ('func'); } else { include 'main.php'; But thats not the problem. I am using id in an sql query, but not shown in my example (sorry :) ) But i wanted to show what i am a