It’s a visibility scope issue. Can I make the variables global?
For some reason within main.php,
echo '<div class="header"><div class="counts">'.$displaycount.' </div><h5>.$LANG_MEMBERS_ONLINE_NOW.' ?></h5></div>';
isn’t displaying. Thanks in advance.
PHP functions will only use local copies of variables unless you explicitly tell it to use the global versions.
There are two ways of doing this:
Access it as
$GLOBALS['LANG_MEMBERS_ONLINE_NOW']everywhere you use it or putglobal $LANG_MEMBERS_ONLINE_NOW;at the top of the function.Edit: It would also work with
$displaycount(as$GLOBALS['displaycount']), but for whatever reason, I assumed$LANG_MEMBERS_ONLINE_NOWwas the only global when I posted this. Whoops.