Parse error: syntax error, unexpected T_GLOBAL in blah blah
Hi There -
Am on a Drupal site and have run into the above error with the following code:
<?php if (module_exists('flatforum')) { ?>
<span class="author-role">
<?php print t('') . ' ' . GLOBAL $user; print $user->role; ?><br />
</span>
<?php } ?>
The error is on the line that says "print t() . ' ' . global etc.
I've tried changing it to this, but really have no idea what I'm doing. I don't get the error anymore, but nothing prints either.
<?php if (module_exists('flatforum')) : ?>
<span class="author-role">
<?php global $user; ?>
<?php print t('') . ' ' . $user . $user->role; ?>
<br />
</span>
<?php endif; ?>
I'd be so grateful for any help you can give me. Happy New Year everyone!