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?
Thanks
Carey
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003