Date: 10/15/00
- Next message: Daniel Bondurant: "[phplib] hidding template blocks"
- Previous message: R.B. Scholtus: "Re: [phplib] Call $sess->register from a function"
- In reply to: R.B. Scholtus: "Re: [phplib] Call $sess->register from a function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sometimes you just can't see the forest from the trees!
Thanks for your help!!!!
-Adam
> -----Original Message-----
> From: R.B. Scholtus [mailto:regiment <email protected>]
> Sent: Monday, October 16, 2000 1:10 PM
> To: Adam Weisbart; phplib <email protected>
> Subject: Re: [phplib] Call $sess->register from a function
>
>
> why don't you global the variable in the function? this should work:
>
> page_open (...);
>
> ...
>
> function be_usefull_please() {
> global $sess, $usefullness;
> ...
> $sess->register("usefullness");
> ...
> }
>
> ...
>
>
> ----- Original Message -----
> From: Adam Weisbart <adam <email protected>>
> To: <phplib <email protected>>
> Sent: Sunday, October 15, 2000 10:00 PM
> Subject: [phplib] Call $sess->register from a function
>
>
> > Greetings,
> >
> > I am trying to call:
> >
> > $sess->register("variable");
> >
> > ...from inside a function and it does not work. If I move the
> code out of
> > the function and into the main body of the script, it works fine. I
> realize
> > this is a scope problem, but I have been unable to remedy it.
> Any ideas? I
> > am able to register the variable in main, and then pass it by
> reference to
> > the function, but this seems rather messy.
> >
> > Thank you!
> >
> > -Adam
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Daniel Bondurant: "[phplib] hidding template blocks"
- Previous message: R.B. Scholtus: "Re: [phplib] Call $sess->register from a function"
- In reply to: R.B. Scholtus: "Re: [phplib] Call $sess->register from a function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

