This forum is now read-only. Please use our new forums at

504 points
Submitted by
Saeesh Tendulkar
almost 3 years ago

Does php have to be enclosed in <p> tags of html?

In many of the programs in the php course, the php code was enclosed between tags of html, while sometimes tags.Why is this done?'

0 votes


There are times where you will use PHP inside the HTML Tags. This is done because PHP was designed to serve content in a Dynamic form.

For example:

    <li><?php //Some items in the list ?></li>

Hope this helps

680 points
Submitted by
almost 3 years ago