Convert PHP Tags To HTML/Text
From:
Conditional Text
Email
To:
Currently supported conversions:
Basic Echo
<?php echo $var; ?>
{{ $var }}
If Statement
<?php if ($condition): ?> ... <?php endif; ?>
{php if={$condition}} ... {php endif}
Foreach Loop
<?php foreach ($arr as $val): ?> ... <?php endforeach; ?>
{php foreach={$arr as $val}} ... {php endforeach}
Partially supported conversions:
Email Links
<a href="mailto:<?php echo $var; ?>">Text</a>
{link email={$var} text="Text"}
BUG: This only matches link text that doesn't contain tags. Otherwise the Basic Echo conversion is applied:
<a href="mailto:<?php echo $var; ?>"><em>Text</em></a>
<a href="mailto:{{ $var }}"><em>Text</em></a>