How did you learn PHP

mcklovin

New Member
Messages
155
Reaction score
1
Points
0
Sorry if this is already posted somewhere, but if you search anything with php here, you get alottt of results.

I want to learn php, and everyone recomends books, oddly enough no one seems to have a title of a book. I have tried books most of the one's I got either

1. Did not work ie. for dummy books
or
2. Were way to advanced and did not explain enough

So basically my question is how did you learn php, what did you use, how long did it take you, was it worth it?
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
About a year to learn, at least well enough to do things by yourself. At that time php.net's function lists and such will be very very helpful when you start trying to do things that you are not too sure how to do. Thats a really nice way to learn, lots of examples lots of reasoning. Though when you look at code in tutorials and when you are reading you have to stop at the code and think to yourself what is it doing? Logically work out the code in your mind so you can at least explain it to yourself in some way... will make it much easier to learn, more fun, and you will get to know how to use it much faster.

For me, I mostly searched the internet for tutorials... I also used a few books, I have a few that i'll post in a few minutes here that are fairly long that I don't think I will ever finish (not with my work load atm) but you could always check out if you need to.

Oh and don't get me wrong... you can still code stuff but to actually know how it works and have a firm understanding im estimating at least 6 months to 1 year. Also depends on how much you can do at a time, if you have the time to work on it or if its just a hour here and there.

Edit: I found this to be the most helpful book... its not too techy its pretty simple and explains what you need to know to start off with if reading is what you like to do.
PHP Solutions - Dynamic Web Design Made Easy (2006)

As for was it worth it? I don't think there is a website I have made that doesn't use PHP in some part of it. Mostly because it is a very widely used language for members systems, news systems and all those good things.

Edit 2: OMG I know this is getting huge but just had to mention personally I don't like w3schools tutorials since all they do is throw the code at you and partially explain it. I think it's better if you get to know what it does and what it is used for.
 
Last edited:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
I learned one day, I got knocked off my head with a rock and I know PHP, funny how that works.
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
^ liar

edit: to save spam, responding to the next post in here...

"good"
 
Last edited:

dickey

New Member
Messages
128
Reaction score
0
Points
0
If you have basic knowledge of c or c++ it should help you with syntax.

The book I used is "PHP, MySQL and Apache" with ISBN 0-672-32873-9

It is one of those sam's Teach Yourself books. I particularly like the way it is organized. It gives you a little of everything and that is all you will ever need. If you get comfortable enough with PHP you can easily expand-as-you-need by browsing what functions you need. a fairly good example of one of my experience is when I was challenged to login to a different site. I started by googling for:
howto using php browse external site and login

it gave a huge list. and one common thing I noticed was the term screen scraping. So I googled Screen Scraping until I come accross PHP cURL

So I was able to upgrade my knowledge of PHP.

Edit:
Basically what you need is to understand concepts from there any language would be a matter of vocabulary(commands and its equivalents), and formalities (syntax). The concept would always be yours.
 
Last edited:

xmakina

New Member
Messages
264
Reaction score
0
Points
0
In all honesty, I wouldn't recommend a book for a language as popular as PHP.

It really depends on your learning style. I'm very kinasthetic, I learn a lot quicker when given a tangible response. So I find it much more useful to copy some source code, look at the result, make a change and see the new outcome. Because of this, I find books very hard to learn from compared to, say, w3schools or just googling what I'm after.

I learnt PHP through w3schools and the internet in general. I first tried PHP over 2 years ago. Because I didn't have any kind of project (and I never do something big with a language I don't know) I just picked it up from time to time. Over the last few months I've been studying php intensely as I started a large project. I reckon I've got about 6 solid months experience and I'm pretty damn good now.

And was it worth it? Totally. PHP is a f***ing fantastic language. It makes a lot of sense, it's very easy to use, it's debugger actually tells you something useful and being able to just place variables into a string... well... that's just the icing on a delicious cake.
 

dickey

New Member
Messages
128
Reaction score
0
Points
0
One more way is to try to take a project and make it in php. remember just about any html page can be done through php. then from there learn how to execute your project. then forums are a lot helpful especially if you ask the right questions.

aside:
to xmakina: Where can I find that php debugger is it incorporated to php or is it a 3rd party software?
 

NattyFido

New Member
Messages
14
Reaction score
0
Points
0
I found the best way for me to learn PHP, was to download example code etc, see how it works and then change it to suit my needs.
Basically a lot ot trial and error. I have never programmed in C, C++ etc, but I was able to understand PHP quite easily.

Start with something simple and experiment!!

Edit:
Also, install a web server on your PC, WAMP or something similar, and you can debug your PHP code without having to upload it first.
 
Last edited:

natsuki

New Member
Messages
112
Reaction score
0
Points
0
I started to learn PHP through reading tutorials on the net. I googled for tutorials and found webucator.com. After reading the whole tutorial, at first, I did not concern myself with the details. I just wrote some code and tried them. Basically trial and error. That way I got myself familiarized with the way php is written. Then I downloaded a copy of the PHP manual.

I got a local server XAMPP on my pc so I am able to test php scripts without connecting to the net.

How long you'll take to learn depends on you. If you are used to programming, you'll generally find it easy and learn faster. PHP syntax is quite similar to C++ except for a few things, just like most other programming languages.

When I needed something done by php, I search the php manual until I find something interesting. I usually end up reading everything even if it doesn't have any relation to what I'm looking for. That way, I got to learn about GD library while learning classes, variable functions, regex even when they didn't have anything to do with what I was originally searching for!

The best and tested way to learn is to try it out yourself. If you rely too much on spoon-fed codes, you'll be helpless and will always end up asking for help from other people.
 
Last edited:

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
Like xmakina, I'm more of a person who has to try it out. I started to be interested in PHP when a friend made a tutorial about it for a school project. I read it all and reread the most interesting bits to understand them better. As I had already made 1-3 websites in pure HTML, I ended up thinking how useful PHP could be (I guess the first use was putting my site's menu in an include).

And it just went gradually from there, tried one thing, got it to work, read about other functions, eventually found a use for them and tried them out, learned more, etc. Now I do everything in PHP and although I have not read any book or website from beginning to end, I'm always learning to use specifically what I need to use. Sometimes I hear about new functions and the cycle starts again ^^


BTW, since we're talking about it, if someone could PM me info about how to run a server on my PC and if it would allow me to test PHP/MySQL files and databases, I'd be grateful (credits for a nice, detailed answer).
 

dickey

New Member
Messages
128
Reaction score
0
Points
0
I would advise you to download individual packages for that as it gives you more control.

The steps I take was first to install Apache, then PHP, then MySQL, I basically took all the defaults until MySQL where I made sure that the character encoding was UTF-8. It gives less problems that way.

but if you are a linux user. I think using a package will make it easier. If you are interested PM me I can help more with the linux-ubuntu LAMP Server.
 

Ainokea

New Member
Messages
127
Reaction score
0
Points
0
I learned by some online tutorials but mostly through trial and error
 

dickey

New Member
Messages
128
Reaction score
0
Points
0
Well I guess I am the bookish type. I started from some online tutorials but It isn;t enough for me. So I purchased a book and decided to sit down and write some code in pen and paper then encoded it and when it worked I decided to browse the whole book. I didn't actually read it just skimmed through the contents and see what topics interests me then read that specific topic. But it actually depends on how you do your learning process and seeing how the original poster is asking for a good book, kindly share if ever you came accross a good book for php.:cool:
 

balaji2u

New Member
Messages
410
Reaction score
2
Points
0
I got to know the word php whenever i search for good hacking manual about screwing some thing and this php strikes me very often and then i think what the hell is php doing here ..
and then one sunny day before 6 moths from now i started analyzing the history of php almost every aspect i found about php attracts me. and i just want to stand a bit different from the other guys in class who die for solving apptitudes in c,c++,java bla bla ..
now i think im learning php well but i dont yet be strong in regex ,soap,xsl concepts in php but im quite confident that i will be a master in php and attain my zend certification in coming months..
one more interesting thing about php is that microsoft had a notice in their site that "Its easy to migrate from asp to php" sounds cool na..
Good Luck to all.
 

xmakina

New Member
Messages
264
Reaction score
0
Points
0
Salvatos:

You're gonna need some experience with Linus to do this:
1) Get VMWare Server
2) Get Ubuntu 8.04 LTS Server Edition
3) Create a Virtual Machine and install an Ubuntu LAMP (Linux, Apache, MySQL, PHP) server on it, it'll be an option when installing.

Use this page if you need more help: http://www.zaphu.com/2007/08/21/ubuntu-lamp-server-guide-configure-apache-mysql-and-cgi-bin/

When I said "debugger" I meant it's error messages are quick and easy to read. It's rare that I'm hunting for a bug for more than 5 minutes.
 

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
Salvatos:

You're gonna need some experience with Linus to do this:
1) Get VMWare Server
2) Get Ubuntu 8.04 LTS Server Edition
3) Create a Virtual Machine and install an Ubuntu LAMP (Linux, Apache, MySQL, PHP) server on it, it'll be an option when installing.

Use this page if you need more help: http://www.zaphu.com/2007/08/21/ubuntu-lamp-server-guide-configure-apache-mysql-and-cgi-bin/

When I said "debugger" I meant it's error messages are quick and easy to read. It's rare that I'm hunting for a bug for more than 5 minutes.

That's extremely complicated for someone to do just for a test server... might as well just download and install XAMPP or Apache2Triad to test with. It requires no configuration and most people are never going to need to install apache/mysql/php on their own.

Though idk if you are really interested in it you could do this.
 
Top