PHP within a PHP variable
Posted: Thu Jan 24, 2008 3:43 pm
Hi I'm very new to PHP. I am just trying to nest PHP in a variable. On my inside.php page I have the following code where a sidebar is supposed to be.
Then on the interior page I have the following php not just put a string in the variable but to include another bit of php for a sidebar blog.
Of course this isn't working. Please let me know a better way.
Code: Select all
<? echo "$insidesidebar"; ?>Code: Select all
$insidesidebar = '<?php echo $sideData; ?>';