I have tried to add a <?php ?> tag in an element but always it get commented like if wrote
it becomesCode:<?php echo "hello"; ?>
Code:<!--?php echo "hello"; ?-->
Printable View
I have tried to add a <?php ?> tag in an element but always it get commented like if wrote
it becomesCode:<?php echo "hello"; ?>
Code:<!--?php echo "hello"; ?-->
Where exactly did you insert that code?
You can use PHP code only in PHP files or in Templates, not in any text fields of content elements, modules, articles etc.
As Spooky says, and you can import PHP into the BE e.g. into the RTE with an insert tag
https://docs.contao.org/books/manual...clude-elementsCode:{{file::myPHP.html5}}
{{file::myPHP.php}}
ps My FF 39 did not scroll to the anchor #include-elements, chrome does. Don't know why.