Variable scope – your PHP code will not be executed in the global scope, so you’ll need to explicitly declare global variables as required. If you want to pass data between separate <txp:php> blocks, you’ll need to do something like this: