[vox-tech] php: variables within echo

Peter Jay Salzman p at dirac.org
Sat Dec 25 23:34:03 PST 2004


On Sat 25 Dec 04, 11:19 PM, Mark K. Kim <lugod at cbreak.org> said:
> It's because $_POST is an array whereas $var is not.  Try this instead:
> 
>   echo "<p>Blue.  $_POST[elderberries]</p>";
 
Aha.  OK, that makes sense.  I was thinking that $_POST is like an array of
pointers to strings, but once you dereference it, $_POST['bleah'] becomes a
string.  But that's not the way to think of it in this language.

Thanks Mark!

Pete


More information about the vox-tech mailing list