Jump to content

which attributes can have php inline code?


WesleyA

Recommended Posts

PHP is not aware of the existence of HTML. HTML is not aware of the existence of PHP.

 

You can put PHP absolutely anywhere in the HTML, it doesn't really matter.

 

You can even do this:

<h<?php echo 2;?>>Text</<?php echo 'h'; ?>2>

All PHP does is output text, which may or may not be valid HTML.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...