Page 1 of 1

Issue with php variables inline with HTML Code

Posted: Wed Oct 14, 2009 6:18 pm
by chrisbowles
My Code is...

Code: Select all

 
<?php
 $b = 1;
 echo $save[$b][name];
?>
 
My Result is...

Code: Select all

 
Displays the correct value
 
If I try to use the same variable with HTML code
My Code is...

Code: Select all

 
<?php
 $b = 1;
 echo"<table><tr><td>$save[$b][name]</td></tr></table>";
?>
 

Code: Select all

 
Displays array[name]
 
I can't for the life of me figure out why it displays two different ways.