Is it good practice to inject HTML code using require_once (); in the middle of HTML?
Example:
<div id="col_left">
<?php require_once ('../application/top_sidebar.php'); ?>
</div>
Is it good practice to inject HTML code using require_once (); in the middle of HTML?
Example:
<div id="col_left">
<?php require_once ('../application/top_sidebar.php'); ?>
</div>
Is it good practice to inject HTML code using require_once (); in the middle of HTML?
Yes it is, after all that's why that function exists and including chunk of html that way is very common practice for example including header, sidebars, footer, etc to construct your templates.
That much php code is even permissible in MVC design pattern where you try to put minimum of php code inside the html.