Can anyone tell me what is the procedure to insert PHP in HTML language?And will file extensiton also change?
nnhamane
0
Newbie Poster
Recommended Answers
Jump to Post<html> <body> <p> This is a html paragraph </p> <?php echo 'This is some php txt'; ?> </body> </html>
You will have to name your files with a php extension for the server to recognize them as PHP files and have the PHP parser look for the …
Jump to PostYou don't even need the php part in <?php ?>.
Anywhere where you have PHP code instead of HTML, you should use the <? .... ?> to enclose the PHP code.
Also, the file extension should be .php (for example index.php).
Just a precaution:
using <? ?> will work …
All 7 Replies
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
alpha2006
0
Junior Poster
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
TopDogger
5
Junior Poster in Training
m-soft
0
Junior Poster in Training
remiremi
0
Newbie Poster
Puckdropper
7
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.