I have a php echo code inside a variable I want to echo from another page. I can't seem to echo the "$list_of_teachers" without having it disappear or having it read the code itself.
Here's what I have:
====================
picture-gallery.php
//A picture gallery with variables
$teacher = "Henderson";
$title = "Third Grade Class From Mrs Henderson";
$html = "
<img src='student1.jpg'>
<img src='student2.jpg'>
<br />
Right before lunch and recess
<br />
Email <?php echo \$list_of_teachers[$teacher];?>
";====================
template.php
//universal template for all galleries
echo "$title <br /> $html";
echo "$link"; //pull data from an array====================
My Arrays
$list_of_teachers[Henderson] = "henderson@henderson.com";
$list_of_teachers[Smith] = "smith@smith.com";