Forum Moderators: coopster
I can't say when the fog clears. When you start in on PHP, you have such a small "vocabulary" and such poor command of the syntax that when you start in on a script, you do things in the most roundabout ways with tons of errors. Bit by bit, it will be less roundabout and have fewer errors. Eventually, two things will happen
- you'll know the basics so you won't fight with that and only hte new parts will seem foggy. That's manageable.
- you'll develop better means of approaching problems, so you'll cut through the fog much more quickly.
One "problem" with PHP is that it is a highly featured language. Often you can spend hours doing something only to find that there's a built-in function that does the same thing.
Anyway, I know it's dreadfully dry, but the first commandement is
1. THOU SHALT DOWNLOAD THE MANUAL AND READ IT
Not read it top to bottom, but hunt around and peruse it when you have the chance. If you're working on code in the meantime, you'll have a lot of "So that's the way to do it" moments.
If you spend a few hours a day on PHP for a couple of months, you should have a pretty good handle on the basics. Less if you know other programming languages, possibly more if you really aren't a programmer by nature.
Like anything, though, you're always learning (should be anyway). You only have the fog clear entirely when you quit pushing yourself to learn more. It's managing the fog that's the key!
>> THOU SHALT DOWNLOAD THE MANUAL AND READ IT
AND OFTEN!
I run through there anytime I have the chance, new functions, changes to old functions, you never know what you will find.
Also read the Changelog for all the releases. It is a quick shortcut to knowing what was added and changed, you still need to peruse the manual often though.
I guess I have actually broken that rule, I have never downloaded the manual and I have never bought a php book, go figure. ;)
When I got a high speed connection, I found a site search of php.net was pretty good.
Still, one of the things about the .chm help file is that you can include things like punctuation marks in your search and the layout is just better.
... am reading all i can and playing as much as I have time to
Speaking as a distinctly untalented scripter (for whom the fog will never clear) I'm pretty sure you have a sound strategy there. One suggestion I would add is to remain doggedly persistent when the going gets tough, and never be afraid of making a fool of yourself in great forums like this one.
there are never any fools here. Don't let asming questions be daunting in any way. Forums are about community and community members are dedicated to helping each other.
There are also no stupid questions.
For every person who asks a question there are 10 others who are too embarassed to ask the same one. By helping yourself you are often silently helping countless others.
You only look like a fool when you don't ask. ;)
baze
I just use the thing that used to be called 'mycroft' in Firefox for looking stuff up in the manual. Check out that box just left of the address bar - if it doesn't have a drop-down option 'add engines', then you can install Mycroft. This allows you to do various searches. PHP has two options - one for looking up functions, another for the php.net site in English - I have both. Very, very handy - add an icon to your toolbar for opening a new tab, click on that, type in the function you need, and it's there in its current form with all user-contrib notes. Also be sure to get the Webster Thesaurus option - this will help you improve your writing in English, and learning to write better will help you learn to think better - good thinking and good writing are quite interrelated. Good for finding the 'right' word (which usually isn't a 'big' word).
If you're not consistently broadband connected and have Windows, be sure to get the 'extended' chm since it has the handy user notes (xchm doesn't deal well with this unfortunately - the devs say they're coming up with a php-based solution).
1. Get PHP to work on your PC/Notebook/Homeserver:
I use XAMPP from [apachefriends.org...] - just unzip it and it works on Windows.
2. Get yourself a good development environment for PHP. (i.e. an editor specially designed for php) I would recomend the Zend Development Environment (ZDE) - [zend.com...] - its not exactly free, but i think its worth the money. (they do spetial prices for students...)
3. If your not familiar with a new topic of PHP google the web for a tutorial. But be careful using them - if you want to learn something dont just copy the code out of the tutorial!
4. Try out everything! if you've never used a function, write a simple script that tests it - its easier to understand suff if you see it in action. at the moment im trying to grasp the GD-lib image functions in php. what i do to teach myself this is i'm writing a script that creates picture galleries automaticly, even if i know there are meny of these scripts out there waiting to be downloaded. but if i download a ready-made-script i wouldn't learn how it works.
5. dont rush yourself! do some simple scripts at first just to get the hang of scripting php.
hope i could help & regards
adrian
I don't find the php.net that easy to understand and prefer to rely on my Visual Quickstart Guide - PHP for reference.
Another tip is to look at scripts that others have written. Look at each line of code and try and understand how it works.
As others have said "the only stupid question is the one you don't ask".
Good luck, Pete
i just wish there was a php manual i could download like in PDF format or an e-book
You might take a look in the direction of O'Rielly (sp). I found a complete chapter on-line from a php book that really helped me understand the basics of sessions. It was frustrating not to be able to read the other chapters with regards to implementation, but hey, no credit card will do that for ya. Still, I was armed with enough info to be dangerous - and to go looking in other places for what I wanted to know.
Fog? It's been there as long as I can remember.
I'm not plugging any services, and hope I didn't step on the TOS too badly
In your situation, definitely definitely definitely set up a server with Apache/PHP/Mysql on your machine as suggested.
Also definitely definitely definitely download a manual. I recommend the windows help or the extended windows help (includes user comments)
[php.net...]
If you want to print the whole manual (not recommended), there is a printer-friendly version at
[us3.php.net...]
There's so much in there you'll never use (like the function definition for many different database systems). A waste of paper most likely.
[php.net...]
It will let you search.
baze