View Single Post

  #1 (permalink)  
Old 05-07-2008
Pakku
 
Posts: n/a
Default embedded variable in HTML

On this site http://www.onlamp.com/pub/a/php/2001...undations.html
I discovered that I could embed php variables in html using this
notation

The variable $var has a value of: <?=$var?><br />

But I think this doesn't work with php version 5 and above. I
searched and searched on the web to confirm this but it was rather
difficult (I can't, for example, search on the string "<?=")

I did see one reference which discouraged the use of this approach
because of some XML compliance issue.

Would appreciate hearing from you all about this, I found it much
easier to do this than reams of echo statements to generate html.
Reply With Quote