Jump to content
Sign in to follow this  
Deaf Raiders

PHP vs HTML

PHP vs HTML  

27 members have voted

  1. 1. What is better

    • PHP
      16
    • HTML (inlcude XHTML)
      3
    • 0


Recommended Posts

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.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
WHAT.

 

 

 

 

They are completely different things!!

 

 

 

 

 

NEW VOTE!

WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?

 

The Moon

 

it comes every night

 

Pat

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites

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 :) )

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      57,724
    • Most Online
      4,970

    Newest Member
    lomawheels81
    Joined
  • Forum Statistics

    • Total Topics
      65,787
    • Total Posts
      454,656
×