Jump to content

nctfleetlist

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nctfleetlist's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It worked a treat!! Thank you ever so much for your time and help Mr Hyde, it is most appreciated!!!
  2. Parse error: syntax error, unexpected '>' in /home/nctflee1/public_html/account/test.php on line 24 <?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> <font class="font">'<div>' . ssi_welcome() . '</div>'; </div></font> </div>'; } else { //message or section to show if they are not allowed. echo ''; } ?> thanks for your help so far
  3. As far as I am aware it prints something to the screen. In normal circumstances <?php ssi_welcome(); ?> displays as "Wecome Guest" or if user is logged in "welcome member_name"
  4. thanks for your quick reply, I am still learning php so got confused with what is and what is not a function lol. doing what you suggested I either get " Parse error: syntax error, unexpected '>' in [full path to my file name] If I use a backslash (\) to quit the apostrophe's (') it simply prints the text as is: (' . ssi_welcome() . ' '; )
  5. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.