Good day all, I'm a complete newbie to PHP. I mostly do HTML, but right now I am working on a project that requires the use of both. Is it possible to include PHP into a HTML document and have it still run at PHP? What I mean is, I know that you can have HTML in a .php file, but can you have PHP in a .html file? If not what is the best solution to this problem. I would like to have them both co-exist with each other so that I can get the best of both worlds. Mostly what I would be including in the end result is <?php echo> where the PHP will echo information from another file into the present file, if that makes sense. Thanks in advance
Just rename file php and start the doc with the <?php tag and use ?> for end and <? start of php throughout the doc. for ex <?php sum variables or includes ?> sum html here for header <? if (sumthin =sumthin) {?> sum reg html here <?}?> some more html here etc... <? echo "whohoo"; /*add newlines if needed*/ ?>