What is the difference between php and html?

funny Asked by yadav about 1 year ago, 3 answers.

hi friends, I have some knowledge about html. Once I read php and it like html. so want to know that what is main difference between html and php? Please tell me all information about it.

Answered by wastentime on Aug 18, 2007, 04:23AM
| 45 answers.

html is a very simple language with lots of limitations. php is a much more complex and sophisticated programing language. html is kind of a beginers language I guess you could say, where as php is very complex. if you are familiar with html keep going with that as html can generally be used in combination with php, and it will help you some. php also is used in combination with a database such as mysql which can be edited with online software such as phpmyadmin or similar.

Once upon a time html was the thing, then came coldfusion, which incidently is what myspace uses, but php is 100x more popular than any other programming language out there right now.

| 1 of 1 thought this was helpful

Answered by cavanuk on Aug 20, 2007, 11:00AM
| 23 answers.

PHP allows you to create non-static pages and interact with databases.

PHP is a scripting language that is embedded in an HTML page. HTML provides the basic structure and simple non-chaning elements of a page\site while PHP allows you to display different content to different visitors or on different days.

It also allows you to collect information from visitors and store or display the results. An example would be a guest book.

| 1 of 1 thought this was helpful

Answered by chaganti on Aug 12, 2008, 10:14PM

PHP files are just like HTML files, but they can include both HTML and PHP code. The PHP code is parsed (or executed) by the Web server when the page is accessed and the resulting output is written as HTML within the Web page. When a user accesses a PHP page, his Web browser only gets sent the HTML code, since the Web server has processed the PHP code in the background. Most PHP pages are processed so quickly that it does not noticeably slow down the loading of the Web page.

The .php extension is important, since it tells the Web server that the page may include PHP code. Therefore, it must be run through the server's PHP engine before being sent to a client's Web browser. This allows dynamic content to be generated each time the Web page is loaded, based on the variables included in the PHP code. For example, PHP pages may load objects such as the current date and time, data from form fields submitted by a user, or information from a database. Still, once the page reaches the user's Web browser, everything is formatted a

You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain HTML. This is because the scripts are executed on the server before the result is sent back to the browser.

PHP automatically converts the variable to the correct data type, depending on how they are set.

Answer this Question: "What is the difference between php and html?"

Your Answer: HTML is not allowed.


Back to top

Popular questions related to What is the difference between php and html?