Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-09 03:59:33
- trhaynes
- New Member
- Registered: 2006-04-14
- Posts: 8
PHP variables not usable between <txp:php> blocks?
Hi there. I’d like to set a variable in one PHP block (<txp:php> $teststring = “foo”; </txp:php>) and then use it in a later PHP block (<txp:php> echo $teststring; </txp:php>).
Is this not possible? It’s not working (I just see the empty string).
Thanks.
tom
Offline
Offline
#3 2007-01-09 04:21:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: PHP variables not usable between <txp:php> blocks?
FAQ: Using PHP code in Textpattern (scroll down to “Variable Scope”)
Edit: Ah shoot, jm beat me to the punch. ;)
Offline
#4 2007-01-09 04:25:01
- trhaynes
- New Member
- Registered: 2006-04-14
- Posts: 8
Re: PHP variables not usable between <txp:php> blocks?
You guys are awesome – thanks a million.
Offline