Content last modified Tuesday 24 August 2021
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:
30 Mar 2005

You know you want to visit the Archives.
Published with Textpattern