I have just got my head around HTML and the basics of CSS and I want to learn PHP, can anyone recommend tutorials/books/sites or even a method of learning? I have never done anything with programming before. Also do I need to have a domain with hosting to test out/write scripts?
This is a common question, and has been answered numerous times. Not trying to be a bitch, but search the forums for "learning PHP". No, you can set up your local server. Install XAMPP: http://www.apachefriends.org/en/xampp.html
... or you could go the whole hog and install Apache/PHP/MySQL, it's really a lot easier than you might think, pretty much point and click. If you're going to be developing/building sites it's a good idea to get yourself an 'offline' development environment anyway. Jon
Meh I could never really get how to do it (without an all-in-one pack). So I installed uniform server, and now I can't get PgSQL to work with it My knowledge has come a long way since then though, so I may try again sometime.
I suggest you took on the site Tizag. It walks you through things, from variables to conditions, in an easy to cope with way. Once you've done that, I suggest you download some relatively simple scripts and read through them any try to understand them, using PHP.net to look up functions you don't understand.
Yeah, Tizag is the best site I have found to learn. After you run through tTzag, look at the wider scope w3schools covers - more functions, though you already know the basics.
I think the best way to learn PHP or any other language is to start developing small projects, and that way you will see how things work (forms, validations, databases, etc).
Thank you all for your posts, nico_swd - apologies I will try and remember to search before posting in the future. So an install of apache, mysql and php and then i should be able to set up an "offline" development area?
Just install xampp that was mentioned in this thread already. After that then you can work locally on your computer.
Yes. That'll set up a directory on your computer as an area that you can access through your browser and have the php processed. You could also get a free host with php support. When I first learned php, I worked on Frihost for about a year before I upgraded to a paid host. I don't think it's reliable enough for real development purposes, but it's great for small scale projects that you want to test out with your friends. As for learning, I'd suggest three things. Read Practical PHP Programming. It's a great free book for learning PHP. Frequent PHP forums (like DigitalPoint). If you opt to use Frihost as a free host, you'll need to stay somewhat active in their forums as well. Reading other people's problems and working out an answer to their questions is probably the best way to learn. You learn far better by teaching and doing than be reading. As a last resort, check the official php.net documentation. This is a huge resource, and it's great for getting the low-down on a specific function. IMO it's too big and disorganized to be a good learning source, tho, so use it as a reference to supplement the book and the forums. Good luck, - Walkere