On Mon, 2003-12-22 at 13:09, John W. Holmes wrote:
> Carey Baird wrote:
> > Hey,
> >
> > I have stored the name of a function as a variable. I have then passed the
> > variable to another function as follows:
> >
> > //put function name in a variable
> > $contentfunction = ânewsadmincontent()â;
Carey Baird wrote:
Hey,
I have stored the name of a function as a variable. I have then passed the
variable to another function as follows:
//put function name in a variable
$contentfunction = “newsadmincontent()”;
Take off the parenthesis...
$contentfunction = 'newsadmincontent';
To call the
On Mon, 2003-12-22 at 12:43, Carey Baird wrote:
> Eval ($contentfunction); gave me a parse error:
>
> Parse error: parse error in /home/pickled/public_html/main/inc/html.php(145)
> : eval()'d code on line 1
>
>
> $$contentfunction didnât output anything
>
> Any other ideas?
What are you trying
[snip]
Eval ($contentfunction); gave me a parse error:
Parse error: parse error in
/home/pickled/public_html/main/inc/html.php(145)
: eval()'d code on line 1
[/snip]
try to add a semicolon to the end of the variable $contentfunction =
"newsadmincontent();";
--
PHP General Mailing List (http://
t: 22 December 2003 19:43
To: Carey Baird
Cc: php-gen
Subject: Re: [PHP] evaluating a variable
On Mon, 2003-12-22 at 12:36, Carey Baird wrote:
> Hey,
>
> I have stored the name of a function as a variable. I have then passed the
> variable to another function as follows:
>
> /
try eval($contentfunction);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 2003-12-22 at 12:36, Carey Baird wrote:
> Hey,
>
> I have stored the name of a function as a variable. I have then passed the
> variable to another function as follows:
>
> //put function name in a variable
> $contentfunction = ânewsadmincontent()â;
>
> //pass variable to another func
7 matches
Mail list logo