How much HTML do I need to learn to use PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tm2383
Forum Newbie
Posts: 2
Joined: Fri Oct 02, 2009 7:31 pm

How much HTML do I need to learn to use PHP

Post 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
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

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

Post 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.
Griven
Forum Contributor
Posts: 165
Joined: Sat May 09, 2009 8:23 pm

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

Post 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.
tm2383
Forum Newbie
Posts: 2
Joined: Fri Oct 02, 2009 7:31 pm

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

Post 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
mybikeisgreen
Forum Newbie
Posts: 22
Joined: Thu Oct 01, 2009 6:22 pm

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

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

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

Post by jackpf »

It takes a bit longer to learn how to write good html/xtml though ;)
Post Reply