[TYPO3] pass variables to funtion in php content element?

Bing Du du_bing at hotmail.com
Fri Apr 7 18:01:19 CEST 2006


Hello,

We use PHP 4.3.9. 'register_globals = Off' is set in the php.ini.  The 
following script works fine on the web outside of typo3.  But in typo3, 
it just returns 'a is'.   $GLOBALS[TSFE]->page['title'] works fine 
though.  How should I pass $a to foo() then?

<?php
$a = 'one';
foo();

function foo () {

echo "a is $GLOBALS[a]";
}

?>

Thanks in advance,

Bing



More information about the TYPO3-english mailing list