25

Don't put HTML and PHP code together in one source file πŸ˜›

Comments
  • 5
    How will you manage WordPress and Drupal then?
  • 1
    what about echo?
  • 1
    Echo or heredoc sucks, that's not maintainable at all

    I personally totally agree with this -> https://stackoverflow.com/questions...
  • 1
    While I do understand putting HTML inside Php may generate a code that is difficult to maintain. What's wrong putting php inside HTML using PI ?
  • 4
    How else do you have dynamic pages like with the users name on it for tiny projects?
  • 1
    I had done my mini project like this, actually that time I didn't know that it should be separated in two files.
    Literally, lots of duplicate data was in that project.
  • 2
    Php+templates+JS...there is absolutely no need to place PHP Inside HTML and as stated its not the best design and hard to maintain
  • 0
    PHP is a templating language.
    <?= $included_data ?>
  • 0
    What kind of advice is that? Most PHP frameworks e.g Laravel basically relies on php and html intergration to render a view
  • 0
    @Alpham0use but this does not mean that you should place PHP in your HTML
Add Comment