[TYPO3] global php variable
Dmitry Dulepov
9f4eetb02 at sneakemail.com
Thu Mar 1 10:32:29 CET 2007
Hi!
a owen wrote:
> I having troubles with "global" in my own php-functions. somehow my
> functions cant see outside variables even if i set them as global.
>
> $i = 5;
>
> function test() {
> global $i;
> echo $i;
> }
>
> There is no output, what can i do. i've checked google and php.net, but
> found nothing. i've tried it without typo3 an then it works so i dont
> think it's my server.
Are you sure your function is really executed? It does not have 'user_'
prefix as required by typo3 and most likely typo3 will avoid calling it
because it does not follow conventions.
--
Dmitry Dulepov
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
More information about the TYPO3-english
mailing list