PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I read some where once upon a time that you can put your variables and strings in curly bracees in your html code and they will print out with out using echo. I am unable to find that source again.
Can anyone help me on this? Is the below example correct or what am I missing.
I have never heard of that before but I doubt it could be true. I have heard you can have HTML processed by PHP if you add something to a file (httpd.conf or something?) so that might be how you do it. But you do use PHP at the top of the script anyway so why not name it john.php??
BTW, you never ended the PHP at the top. You should replace "<?" with "?>".
A similar method to the one you're describing (I haven't heard of that either >_>), feel free to replace print with echo and someword with any word you like:
Template engines sometimes use curly braces to denote dynamic content. A bunch of vars are passed to the parsing engine which then looks for delineated { values } in the static content and then echo's out vars of the same name.