encode_php

Encodes any special characters so that the string can be used safely as the value in PHP code.

The value of the attribute can be either qq (double-quote interpolation), here (heredoc interpolation), or q (single-quote interpolation). q is the default.

Example:

    <?php
    $the_title = '<$MTEntryTitle encode_php="q"$>';
    $the_author = "<$MTEntryAuthorDisplayName encode_php="qq"$>";
    $the_text = <<<EOT
    <$MTEntryText encode_php="here"$>
    EOT
    ?>

Related modifiers:

 
This page was last updated on 2009-04-29, 10:51.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.