Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP vs HTML

PHP vs HTML 27 members have voted

  1. 1. What is better

    • PHP
      84%
      16
    • HTML (inlcude XHTML)
      15%
      3
    • 0%
      0

Please sign in or register to vote in this poll.

Featured Replies

Which is the best PHP vs HTML?

 

What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong).

I'm not sure I can choose...since you can use them together to create dynamic pages....

HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly.

PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML.

They do completely different jobs, but work together.

For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me.

The question doesn't make sense. If you were going to ask the question, it would be PHP vs ASP or something like that since both are programming languages and both serve the same purpose.

 

You can use it to build the HTML page for example - outputting a table containing data from the database. HTML is the end result for the work done by PHP... if's elses etc..

I'm not sure I can choose...since you can use them together to create dynamic pages....

HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly.

PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML.

They do completely different jobs, but work together.

For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me.

 

I agree, you cant compare the two as to what is best, html and php work together, amongst other server side languages.

 

Pat

WHAT.

 

 

 

 

They are completely different things!!

 

 

 

 

 

NEW VOTE!

WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?

I don't think you can really compare them seeing as they both do different things :huh:

WHAT.

 

 

 

 

They are completely different things!!

 

 

 

 

 

NEW VOTE!

WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?

 

The Moon

 

it comes every night

 

Pat

HTML = HyperText Markup Language

 

PHP = HyperText: Pre-Processor

I think PHP is more dynamic but they work so well together especially XHTML and PHP. PHP makes HTML work even better 8)

I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course.

I also agree with what the other members said, PHP and HTML complement each other.

  • Author

Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both.

Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both.

 

 

.php files have php code in the original source files that are on the server. When the server fetches a page with a .php extention, it knows that before it sends it accross the net to your browser it has to process the php code and 'construct' the HTML that is generated from it. Once it has processed the php code the resulting page that is sent out is pure HTML, and would work with a .html extention, but because the URL is of the origonal file it retains the .php.

 

Think of PHP as a way to dynamically create html pages before you send it to people's browsers, so for example if I had a page that displayed todays date, I would have some PHP code that fetched the date and then inserted it as HTML. By the time the browser reads page (and you the source code) it knows no different, the only tell tale sign is the .php on the end of the URL.

 

Hope that clears it up :)

php that produces xhtml content :)

 

 

ps even if a page only has html content i still place it in a php file (should i ever want to add dynamic content the page location and name remain the same for the search engines :) )

Basically, PHP generates the content for a page, and this is drawn into html tags and css, which make it look like something more than just a page of text.

 

PHP is backend (content-focussed: what you "read" on a website [assuming it's powered by php]), HTML is front end (visual, basically what you "see" on a website)

I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course.

 

Agreed.

The Moon

 

it comes every night

 

Pat

 

 

The bus comes every 30 minutes... Far superior.

Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html?

 

In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php"

Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html?

You can make Apache parse HTML files as PHP with this line (IIRC):

 

AddHandler application/x-httpd-php .html

 

In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php"

I've been using PHP for about 4 years and I don't think anyone has ever complained about .php over .html - most people haven't a clue what it means.

 

If you want real user-friendliness, in theory you should just remove extensions altogether (in the URL, obviously not on the file).

Which is the best PHP vs HTML?

 

What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong).

 

 

I always disguise my php pages using mod rewrite in htaccess, so a page like /index.php?page=home

reads /home.html. I'm not even sure how this affects SEO, but it keeps my pages inline with most of the web and what most are familiar with. Coding links is tidier too.

u can't compare them. Trying to compare php and html is like comparing a car to a GPS. They do completely different jobs, but need each other to build something usefull. Php isn't needed but it adds interactivity and dynamic content and is very much wanted now-a-days. Just learn html and how to create static webpages then learn how to integrate php and databases (MYSQL).

You need to think of it like this...

 

php generally is the function of how an engine works in a car.

html is the nuts n bolts that put the car together.

css is how the car looks.

 

:)

 

this means.. php is typically function.. ie login, user signup, search functions, etc etc.

html is the structure of how the page will be composed.

css is the positioning, design, colors, everything that truly affects how the page is looking.

 

 

so.. and excuse me i tend to over explain.

 

but php is how we are able to post our threads. html/css is why we see all the pretty colors/designs on this page.

 

hope that helps.

This isnt really a poll, the pole should be PHP vs ASP. If that were the case, I would vote PHP!

 

On another note, html is what php would put out. Not to mention about SEO, that also doesnt make sense. If you create something in PHP to output certain tags or other things which would be in an html tag format. Therefore SEO is going to read the HTML tag.

 

Thing this poll should be reviewed, and resubmitted!

 

POLL:

 

What do you all think?

 

PHP vs ASP?

Upon reading the title of the thread, I was about to post pretty much what everyone else has just said. Oh well, i'll say it anyway. PHP and HTML are too totally different languages. HTML is responsible for creating the structure of a page and PHP is used to control dynamic actions of a page. To put it simply, you can't structure pages entirely in PHP and you can't create dynamic pages entirely with HTML. They're both too different to attempt to compare and decide which is 'better'.

 

What do you all think?

 

PHP vs ASP?

 

PHP by far. I absolutely HATE ASP.

Php and HTML are totally different.

 

I prefer PHP because more options are possible with it.

I don't really see them as something that you can define between, you use them in unison to produce a dynamic website, however I've chosen XHTML because XHTML/CSS will always look good, whereas PHP needs XHTML to look good, if you see what I mean.

  • 2 weeks later...

PHP and HTML can work together, and don't worry about SEO if you know the way how to use PHP script inside HTML tags.

^ ^

This topic should be deleted the person who started it is a spammer.

I know we have already had this discussion before! This cannot be compared, and the person who person who put this on here should be deleted.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.