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

Arrays Forum

View Course

503 points
1e244dd3d4faff72d2065b31d45614a4?s=140&d=retro
Submitted by
Saeesh Tendulkar
over 1 year 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?'
eg:
<p>
<?php
?>
</p>


0 votes

permalink

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:

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

Hope this helps

680 points
5420139652f86397880071ad_970397910
Submitted by
NachoCode
over 1 year ago