Separating PHP and HTML -
i apologize asking such beginner question, i'm unsure on else go such help. i'm creating php website using goggleapp engine. i've created simple form using html in same file php. now, know isn't practice, want break html it's own file. question is, how re-write code assuming html in it's own file?
it fine place php code in same file html code. however, if going duplicate code, best have separate files (maybe header , footer file).
that way can use require_once("header.php") , require_once("footer.php") in each file wants use top , bottom portions of code.
as sven mentioned, can templating. can coding habits such mvc (model view controller) , similar methods.
Comments
Post a Comment