How to Use an ExpressionEngine Variable in PHP
November 27, 2011
If your stuck on how to use expression engine variables dynamically in a php script, you can assign the variable to a php variable using a certain syntax and from there conform it however you like. First off, make sure the EE template has PHP enabled and then pass it to the php code segment in the following fashion:
...template code...
{if title}
<?php
$phpvar = "{title}";
echo $phpvar;
?>
{/if}
... more template code...