Re: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
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()â;

Re: [PHP] evaluating a variable

2003-12-22 Thread John W. Holmes
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

RE: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
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

RE: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
[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://

RE: [PHP] evaluating a variable

2003-12-22 Thread Carey Baird
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: > > /

Re: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
try eval($contentfunction); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
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