Which is the ideal location to insert your PHP code?

To add to a webpage’s clarity we would recommend you to insert your PHP code, when possible, at the start of your page. Nevertheless, there will be occasions calling up your PHP might be a lot easier by inserting your PHP code somewhere in the middle of your HTML. Although permitted, this will not add to your overall code readability because a PHP script might consist of hundreds or even thousands of lines.



Was this useful?