|
Posted by Chung Leong on 04/03/06 00:43
Oli Filth wrote:
> paladin.rithe@gmail.com wrote:
> > I seem to recall seeing an article somewhere about how to easily make
> > functions that just set the variables. I have no idea where that was,
> > or what to look for.
> > I think it defined one function, that set the variable that was named.
> > So, if I called joe(40), it would set $joe = 40; jane(60) would set
> > $jane=60. And they both would use the same function, template() let's
> > say.
>
> I can't think of any way that you could do this in PHP. There is no
> such thing as "template" functions in PHP.
>
> Anyway, would you want to do this?
>
> --
> Oli
Well, there is eval() which can be use to define functions and classes
dynamically.
Navigation:
[Reply to this message]
|