-
Step 1
Begin your document as usual with the standard HTML tags.
-
Step 2
Open a new tag by typing a left alligator bracket followed by a question mark and the letters "php:" don't close the tag yet.
-
Step 3
Add your PHP code in the following lines. Don't forget to document what you're doing by adding comments after two slashes.
-
Step 4
Close your PHP tag by typing a question mark followed by a right alligator bracket.
-
Step 5
Finish your document by adding the rest of the HTML tags and content.
-
Step 1
Create a PHP document as usual.
-
Step 2
Use a print statement such as "echo" to tell the server to display the upcoming content as text when it processes the code for the browser.
-
Step 3
Let the server know you'll be using HTML next by typing a left alligator bracket and the characters "html info" then a closing (right) alligator bracket.
-
Step 4
Close out the PHP by typing a question mark and right alligator bracket if you want, or leave it open. This usually won't make a difference.
-
Step 5
Open the HTML portion of your code in the usual way by typing "html" inside right and left alligator brackets.
-
Step 6
Add the rest of your HTML code.
-
Step 7
Finish up by typing a closing HTML tag (left alligator, forward slash, "html," right alligator). Close your PHP if you haven't already.









