Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

How to write html code in PHP

php

When developing a web application with PHP, we frequently need to print or echo a few HTML results. This work can be accomplished in a variety of ways. Here are a few examples of methods:

Using “echo or print”:– HTML markup, javascript, text, and variables may all be shown with PHP echo or print.

Example 1: This example uses PHP echo to display the result.

Output:-

Example 2: This example uses PHP print to display the result.

Output :

Using echo shorthand or separating HTML: Any expression, variable value, or HTML markup can be shown with the PHP echo shortcut.

Example 1: This example uses PHP echo shorthand to display the result.

Output:

Example 2: Separating HTML from PHP

Output:-

Ashwani Kumar
Latest posts by Ashwani Kumar (see all)
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x