Javatpoint Logo
Javatpoint Logo

How to use PHP in Html

If we want to use PHP in the Html document, then we have to follow the steps which are given below. Using these simple steps, we can easily add the PHP code.

Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the PHP.

Step 2: Now, we have to place the cursor in any tag of the <body> tag where we want to add the code of PHP. And, then we have to type the start and end tag of PHP.

Step 3: After then, we have to type the code of PHP between the tags of PHP.

Step 4: When we successfully add the PHP code, then we have to save the Html file and then run the file in the browser.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA