Hi all,
I am trying to assign some varaibles via php inside a template, yet they seem to get reassigned when I echo them:
{exp:channel:entries channel="staticpage" entry_id="{embed:current_id}" dynamic="off"}
<?php
$page_title = "{title}";
?>
<div class="panel">
<div class="titlebig"><?php echo $page_title; ?></div>
</div>
{/exp:channel:entries}
{exp:channel:entries entry_id="{segment_3}" dynamic="off"}
<div class="panel">
<div class="titlebig"><?php echo $page_title; ?></div>
</div>
{/exp:channel:entries}The first time I echo $page_title it displays the correct title from channel “staticpage”, but the 2nd time $page_title suddenly becomes the title for entry_id {segment_3}
ie. $page_title has become reassigned in the next {exp:channel:entries} loop even though the php variable was never reassigned?!
Can anyone offer a clue why this is happening?