I am using simple machines forum, and by placing a link to ssi.php in the top of my php page
<?php require_once('/forum/SSI.php');?>
I am able to use some ssi functions. My problem is calling another function from within a function. My first function is this:
<?php
$allowed_groups = array(1,5);
$can_see = FALSE;
foreach ($allowed_groups as $allowed)
if (in_array($allowed, $user_info['groups']))
{
$can_see = TRUE;
break;
}
if ($can_see)
{
echo '
<div>
this is text that i want certain groups to see
</div>';
}
else
{
//message or section to show if they are not allowed.
echo 'this is text that i dont want certain groups to see';
}
?>
This is my second function:
<?php ssi_welcome(); ?>
I want to put the second function inside the first function, like so:
if ($can_see)
{
echo '
<div>
<?php ssi_welcome(); ?>
</div>';
this just gives me the "<?php ssi_welcome(); ?>" displayed on the actual site, it is not calling the separate function.
I have tried different approaches, e.g. $function ssi_welcome; but all it does is display this as text as well..
Please can some one point me in the right direction. Thank you