Page 1 of 1

How much HTML do I need to learn to use PHP

Posted: Fri Oct 02, 2009 7:38 pm
by tm2383
HI,
I'm interested in learning web development, but am a little confused about the relationship between HTML and PHP. Most of the books that I have seen on PHP suggest that a basic knowledge of HTML is required to get the full benefits of the book. Is a basic understanding of HTML all that is required, with PHP replacing much of the functionality and what you would have been programming in HTML, or is a strong understanding of both really required. I'm planning to use Aptana, rather than the WYSIWYG capabilities of Dreamweaver.

Thanks,
Tim

Re: How much HTML do I need to learn to use PHP

Posted: Fri Oct 02, 2009 7:48 pm
by jackpf
Umm....well, if you're creating a website, then yeah, you kind of need to know HTML.

I didn't "learn" it myself though...I just sort of picked it up as I learned PHP.

It's worth reading through the tutorials on W3Schools (or something similar) though tbh...it won't take long.

Re: How much HTML do I need to learn to use PHP

Posted: Fri Oct 02, 2009 7:53 pm
by Griven
Let's use a car analogy...

HTML is the frame of the car. It helps define the shape of the car/website, and aids you in putting everything where it needs to be.
CSS is the shiny body. It will let you make things look how they are supposed to look.
PHP (and other programming languages) is everything else that makes the car run. It makes the car/website go.

To answer your question more directly: yes, a basic understanding of HTML goes a long way in learning PHP. If you don't know anything about HTML, you'll be scratching your head when you look at some code that has HTML and PHP mixed together.

Also, just to be clear, HTML is not a programming language, and PHP does not replace any functionality of HTML. You use HTML to display things to your website's users, and you use PHP to make your site "intelligent" and "dynamic".

Like Jack said, W3Schools is a great resource for learning the basics of HTML and PHP. There are also plenty of books on these subjects available at your local library or any bookstore.

Re: How much HTML do I need to learn to use PHP

Posted: Sat Oct 03, 2009 3:57 am
by tm2383
Thanks for the really detailed reply. That has made things really clear. Thanks also to both of you for suggesting the w3school link. I'll check it out today.

Thanks again,
Tim

Re: How much HTML do I need to learn to use PHP

Posted: Sat Oct 03, 2009 11:25 am
by mybikeisgreen
html is easy to learn. It's not a programming language like PHP. <b> makes things bold <i> makes things italic <p> makes paragraphs <table> makes tables. You can get the hang of it pretty fast.

Re: How much HTML do I need to learn to use PHP

Posted: Sat Oct 03, 2009 11:36 am
by jackpf
It takes a bit longer to learn how to write good html/xtml though ;)