[TYPO3] global php variable

a owen aowen at swissonline.ch
Wed Feb 28 13:24:19 CET 2007


Hi,

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. 

i'm using:
 apache 2.0.55
 php 4.4.2-1.1
 typo3 4.0.2
 lumophpinclude 1.1.1

please help, i'm demoralized by such a apparently easy function.




More information about the TYPO3-english mailing list