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 function
> Html_content($contentfunction);
>  
> //function is:
> function html_content($contentfunction)
> {
> ?>
>                                                 
>   <tr> 
>     <td colspan="2" valign="top">
>             <table width="100%" height="390" border="1" cellpadding="0"
> cellspacing="0" bordercolor="#666666" bgcolor="#FFFFFF">
>         <tr> 
>                         <td valign="top">
>                         <?
>                         $contentfunction; //doesnât work
>                         Echo $contentfunction; //outputs the name of the
> function but does not evaluate it
>                         Echo â<? â.$contentfunction.â ?>â; //outputs <?
> Newsadmincontent() ?> but does not evaluate it
>                          ?>
>                          </td>
>         </tr>
>         </table>
>     </td>
>   </tr>
>                                                 
> <?
> }
>  
> 
> This does seem like a simple question but I cannot find any information to
> help me. Can anyone tell me how to get the function to be executed here?

Try $$contentfunction

- Brad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to