[TYPO3] EXT develop PHP question

Rocky Ou rockyo at max-source.com
Mon Nov 20 06:49:50 CET 2006


Hey,

I'm quite new to PHP and TYPO3. in my pi1/class.myext.php I define an 
varible using var $usrnm=$GLOBALS['TSFE']->fe_user->user['username'];
and this gives me an warning saying "parse error, unexpected 
T_VARIABLE". But if I put this in main function it works perfectly.

Because I need to use $usrnm in several functions, It would be awesome, 
if I could define it as an global variable. Can any of you give me some 
hint on how to achieve this please?

Thanks in advance!
Rocky



More information about the TYPO3-english mailing list