• In the past when developing a wordpress plugin I have just thrown the html output for my plugin directly in the php file. I was wondering if there is a better way to do this so I dont have all my php logic broken up with html output code. I know if i wasn’t using wordpress i could use a template system of some sort. Is there any way of coding that allows you to separate your html output and php logic for readability sake?

Viewing 1 replies (of 1 total)
  • PHP was specifically developed with work with HTML. There is absolutely no benefit in trying to separate the two into different files.

Viewing 1 replies (of 1 total)
  • The topic ‘Should html code and php code be in the same file?’ is closed to new replies.