Categories
Computers HTML PHP Programming

From HTML to ServerSide HTML or PHP

HTML is a programming language.  Even though the hard core programmers consider it very limited and almost not a programming language, it still is what they are able to view this post as well as every other webpage with.
HTML is a language that the computer can read amazingly fast and make the “stuff” viewable for us humans. So an HTML page has to have certain elements so that the browser can read it to make it viewable.  Standards and that sort of thing all make this happen.
When making the switch to ServerSide HTML, all of these things still exist.  The only change is you can you programming to make repetitions or read the information from a database instead of having to hard code each line of HTML.
Examples:
HTML – This is raw static HTML the server can just put out there right away.

This is the body

PHP – This is also raw static HTML that the server can just serve up without thinking about it.

This is the body

The only difference between these two statements is how many steps it goes through to actually become raw HTML code that your browser can read. The server will actually process and evaluate “This is the body” in this second statement before it is converted into raw html. This next piece of code would give the same exact result to the user:

<?php echo "This is the body"; ?>

or make the text much more dynamic:

<?php //Pull a paragraph from another file or a database ?>

This commented code is where we could put a very dynamic piece pulling from another file or a database.
This is what WordPress is essentially built on.
Please comment for any clarifications you might need or if I just missed something entirely.
Thanks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.