Content last modified Monday 6 March 2017
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 2 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


<txp:zem_php> offers an alternative to <?php ?> for executing PHP code.


  • Executes code in context, so things like $thisarticle work as expected
  • Code execution can be controlled by disabling the plugin, rather than editing $txpac
  • Textpattern tags in the PHP output will be parsed, enabling things like this:

if ($foo) {
echo "<txp:excerpt />";
else {
echo "<txp:body />";

To use, just surround your PHP code in <txp:zem_php> </txp:zem_php> tags. It will work fine in a form or page template.

This probably behaves strangely in some curcumstances, due to the way Textpatten parsing works, so I wouldn’t recommend it for production code. Might be useful for experimenting though.

Article Request Count:
Initially released:
Posted here:
29 Mar 2005
Article modified:
04 Oct 2005

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern