Re: [Phplib-users] Template Problem between a script and a class
Brought to you by:
nhruby,
richardarcher
|
From: Richard A. <rh...@ju...> - 2003-04-14 23:11:41
|
At 5:43 PM +0200 14/4/03, jerome longet wrote:
>---->>> Here is my problem. I pass template instance in my class. This
>is ok, but my class don't fill my template.
> $utils->Navigation($id_asp,$template,$db);
You need to "pass by reference" your template instance to your
utils->Navigation() method. That will allow the utils class to
modify the template instance. The way you have it, the utils
class receives its own private copy of the template instance.
> Here is the code of my class :
>
> class Utils {
>
> function Navigation($id_asp,$template,$db)
So change that to:
function Navigation($id_asp,&$template,$db)
...R.
|