Page 2 of 2

Re: Variable and other stuff

Posted: Mon Jul 12, 2010 5:38 pm
by Jackolantern
Prodigy wrote:well, i went to the site w3schools.com and it turns out i need to learn html/xhtml and javascript b4 i can learn php. I am starting at the root of everything i know, but i'm very eager to learn and i'm hoping to reach a high enough level to create a pro level site / game... more or less... btw how do you know which <!doctype> to use?
You don't need to know Javascript before learning PHP. The only reason they say that on their site is because their PHP tutorial includes a small section on AJAX, which is a Javascript technique for connecting to the web server and running PHP scripts. All you need to learn before PHP is HTML. Of course, a bit of CSS never hurt so that you can format your pages correctly, too.

Doctypes represent the kind of HTML/XHTML you want to use. There are strict types, which nearly follow the rules of XML, a basic mark-up language for tranfering data, to the letter. Then there are transitional types, which allow for some old HTML tag attributes which are deprecated in favor of CSS, like color. Since the next standard is actually going to be HTML 5, and not XHTML 2, you can probably not worry about using XHTML doctypes.

Just a bit of reading up on the different doctypes will likely help you find one that you want to use. Just follow the rules associated with your doctype and your page will render in the best quality, and it will validate correctly if you ever want to use a validator to test your page code. Here is a page from Stackoverflow with info about different Doctypes, but don't get too hung up on them, because knowing every last detail is not crucial.

Re: Variable and other stuff

Posted: Mon Jul 12, 2010 8:30 pm
by Rastan
I mostly use w3schools as a reference. No need to go through all of it. It can't hurt but just scanning over the options will let you gain more tools for something you might want to do later or possibly fix something you have erroring. The section on MYSQL is handy as well for using the different features it has to offer.

Re: Variable and other stuff

Posted: Tue Jul 13, 2010 3:42 am
by Jackolantern
w3schools tutorials are a bit info-light for my tastes, personally. They present a new language feature and will show you the bare bones, most simple use of something in a couple of paragraphs. It works well enough for learning something like HTML, but it is really only useful as a reference, as you said, for something you already know that is as complex as PHP or Javascript.

Re: Variable and other stuff

Posted: Wed Jul 21, 2010 6:00 pm
by ZeroComp
Yes I would rather buy a book on PHP or Javascript than learn it on W3Schools. Like Jack said its like a reference to those languages.