yeszir — 2005-08-17T16:25:01-04:00 — #1
I'm relatively new to php, and am trying to learn. How long did it take you from the point of 0 php knowledge to a level of competence where you could actually construct your own, functional website?
astericks — 2005-08-17T16:33:56-04:00 — #2
Peronsally, I dont think it matters how long it takes others.
There are a few other factors involved. How comfortable you are with programming, how much time you dedicate to it every day/week/month, practice, do you have any programming experience? Those normally help.
Furthermore, by "building a funcitonal website", do you mean database oriented website or a website with a bunch of includes and a contact form?
dbevfat — 2005-08-17T16:34:29-04:00 — #3
Learning is an ongoing process, but as far as constructing a functional website on your own is concerned, it goes quite fast with php.
yeszir — 2005-08-17T16:35:22-04:00 — #4
I guess I was referring more to database driven sites.
quadzoola — 2005-08-17T16:45:16-04:00 — #5
Hmmm...that's almost like asking 'How long is a piece of string?'
The only way to answer that is with an example I guess. I built my first functioning database driven website after about a month of working with PHP, I spent about 2 hours a day on it. Now it was functioning, and live and I must say had a lot of traffic after about a year. Looking back at it however, it wasn't very secure or efficient and the code was a mess.
Learning enough PHP to build an app can be fairly quick, but like anything it depends on how much time you spend working at it. I've been working with PHP for over 5 years now and I'm still learning things all the time.
kayn — 2005-08-17T16:48:52-04:00 — #6
I've been doing it for about 5 years now, and I'm still learning.
Becoming strong in it doesn't take long at all though. It's just practice and learning how to write "optimal" code (like functions, classes, etc).
someonewhois — 2005-08-17T16:51:33-04:00 — #7
Building a database driven site virtually consists of knowing how to use less than 10 things:
Basically just read the [Language Reference section and the [url="http://ca.php.net/manual/en/ref.mysql.php"]MySQL Reference](http://ca.php.net/manual/en/langref.php) page and you're good to go.
Oh, and you need to learn SQL at some point, but you can get off with the basics:
- Knowing how to use phpMyAdmin (relatively straight forward)
- SELECT fields FROM table WHERE field='value';
- UPDATE table SET field='newvalue';
- INSERT table VALUES('field1', 'field2')
- DELETE FROM table WHERE field='value';
Literally, all of the tutorials out there are way too complicated for beginners. Reading books for learning PHP has always seemed redundant to me, considering how basic the syntax is (just to clarify, I mean for learning the basics of PHP -- obviously learning OO techniques or proper database design you could use books, but that basics are pretty... basic).
Once you understand everything from the above links, it'll be a lot easier to follow tutorials, or follow books (ie. PHP Anthology).
For me, I read a few tutorials on MySQL (sample chapters of Kevin Yank's book, as well as something from Harry Feucks' old site), and I was writing a basic database program (basic as in adding/editing/deleting/viewing) within an hour or two.
From there, you should try and write a larger app (I chose to write a bulletin board as my first app, started the same day that I "learned" PHP). If you have a large app to work towards, you'll be able to learn as you go. Writing a large application is nothing more than a bunch of small little applications, so try not to get intimidated.
The best part about writing a larger app is that you'll discover new functions. For example, one day I needed to show just the first 200 characters of the description and so I posted here at SP. Virtually instantly I was given the response to use "echo substr($a, 0, 200); if (strlen($a) > 200) echo '...';". That's how I learned what substr and strlen were. As soon as I found out about the function, I went to php.net/substr and php.net/strlen and read the manual page.
As with everyone, you'll always keep coming across new functions all the time. The key is that when you ask for PHP help at SP (or any other forum), you MUST learn what the given function does. The single worst thing you can do is to take the code they give and just implement it. There are TONS of people here at SP who ask virtually the same question dozens of times because they never actually learn -- it's very frusturating to watch.
Over time, your internal library of PHP function knowledge will grow to the point that you can do almost anything without referencing the manual. And hey, there's no shame in going back to the manual now and then -- the other day I went to the manual for the function in_array because I wasn't sure which was the needle parameter (which you'll notice is a huge issue with PHP -- things tend to jump back and fourth).
Of course, that's just my philosophy. I'm sure a lot of other people will tell you to read a bunch of books and stuff, but it'll ultimately be your decision what route you take.
kings — 2005-08-17T17:24:54-04:00 — #8
:agree: That's pretty much the only reason I go to the manual nowadays.
dmsuperman — 2005-08-17T17:53:10-04:00 — #9
I've been at it for about 3/4 of a year (on and off, sometimes I get into video game playing phases, sometimes programming only) and I feel I've learned quite a bit. I understand the idea of programming and I am able to apply my knowledge from PHP to other languages, which is what is ideal when learning a language. I am able to make database driven projects and I can work with flat files, I can do encryption/decryption, toying with cookies and sessions, and other useful functions. I know how OOP works and can do some of it, just not the advanced stuff (such as extends, maybe it's easy but I just don't know how or what it does). I was able to pick up what I know in C++ very quickly because of my PHP background, and I feel this means I have learned what I need to know in PHP (though I continue to learn it until I move on to ASP next year).
scotty2260 — 2005-08-17T22:05:57-04:00 — #10
I would highly recommend PHP for dummies. It is the simplest book I have been able to find. I read it in about a month, and was able to make a website with some PHP functions right after (with help of the book).
The main thing to remember is not to give up if you have trouble. If there is something you can't figure out, post here and we are all glad to help out.
Also DO NOT learn by viewing other people's code. Most coders (including myself) develop bad habits with experience. Make sure you learn from a professionally written book.
bytecon — 2005-08-17T22:11:23-04:00 — #11
Excellent post Nathan, this certainly applies with me. I started looking into PHP about 1 year or so ago with no programming background. I learnt it as I needed to, i.e. there are some functions in PHP that I have not used yet so I have not read about them yet. But when that project comes along, I'll know where to find out how to do it.
system — 2005-08-18T01:58:38-04:00 — #12
Took me about 4 months (still learning) I wrote a couple sites myself already but i spent about 10-15 hours a day looking at scripts and reading e-books and looking at php.net but its paying off now
molder101 — 2005-08-18T12:51:45-04:00 — #13
You must keep in mind that all of our minds are different. I have no problem retaining information and utilizing it from just seeing it once, perhaps a year later. Just a gift I have.
Others are different. You may be able to get a great grasp on it within a month. If you have experience in other languages -- you are at a definite advantage. I know people who get stuck on relatively simple concepts (arrays, loops, etc) and it takes a month for them to get it straight in their head.
You never know until you try it out. Keep in mind though, practice makes perfect.
If you are asking with respect to: you told someone you would build them a website and you have never done it before -- count on it taking quite a bit longer to learn -- anyone can learn anything -- but there are right and wrong ways of coding. Practice gets you to the right side.
Oh and as previously mentioned by others, you never stop learning a language whether spoken or coded! That is why I love languages so much!
(TIP: books are great but dissecting is better. Find a script archive (php.resourceindex.com is great) and get scripts that look interesting. Dissect them. Break them into lines and based on Google research and looking up stuff on php.net figure out what each line does. If you start that way you will get a much better grasp than just starting with "Hello World!" While the syntax is very important - having a knowledge of the flow is more important - once you understand how it works - learn the code that makes it work!)
system — 2005-08-18T13:35:11-04:00 — #14
FWIW, there are a lot of php books you can download for free.
momos — 2005-08-19T02:45:31-04:00 — #15
shockt — 2005-08-19T03:55:35-04:00 — #16
It took me 3-6 months to feel that I could start calling myself a web programmer. Though I still havent stopped learning. Each new project brings a new challenge that teaches me new things.
da_master — 2005-08-19T04:10:18-04:00 — #17
I have been programming in PHP for around 2 years and am still learning, so I cant really say. Although I felt that after 6 months of solid work learning PHP I could make a pretty simple script.
asprookie — 2005-08-19T04:40:13-04:00 — #18
I myself pretty much learned the basic of ASP within 3 months with the help of various books and tips found on ASP ressources websites.
Now the difficult part from my standpoint is building the database to connect to your PHP, or ASP applications.
At first I thought, OK, so I'll enter all the data from the items in the database, not that simple, cause when you go back to your coding and SQL statements, you realize the way you design your database, specifically how all the elements are related and connected to each other does affect the performance of your website.
So enjoy learning PHP, give yourself a few months, that's the fun part, next you'll have to kill your brains into designing the architecture of your database. But the rewards are immense, cause databases are quite powerful, especially if you put everything in it.
dougbtx — 2005-08-19T06:37:08-04:00 — #19
And I think you have to look beyond PHP if you really want to master web development with PHP, because there are lots of good ideas out there which we can bring to our PHP development.
bartb — 2005-08-19T07:00:52-04:00 — #20
next page →