Jump to content

How to learn PHP?


alazanski

Recommended Posts

But the php manual will be completely overwhelming for you. You won't know what to learn, where to start, and likely find it difficult understanding how to piece different functions together to create an app. However, when you do have some experience I would definitely advise you begin reading common functions etc to fully understand how they work and can be used.

 

First thing, get WAMP or MAMP (for mac) so you can practice php on your system. Will speedup learning curve. Then try to do simple stuff you see all the time - forms, redirects, using cookies, maybe storing and retrieving data from a database. Plan on building a simple app WHILE you read this:

 

http://www.w3schools.com/php/default.asp

 

Main things you need to learn is what apache is, how to use mysql and php together and best practices. For example, I'd first learn how to structure a web app. Search for how a web app SHOULD be structured instead of guessing. Don't take on bad habits, validate everything you learn as much as possible so you don't become like the other 80% of sloppy developers.

 

Check out this thread on the forums for suggestions of good books:

 

http://www.phpfreaks.com/forums/miscellaneous/good-programming-and-web-design-books/

 

You checklist should look something like this:

 

1. install apache, php and mysql on your local system

2. get some decent learning materials (see above)

3. plan a simple application or follow from a decent book

4. reference the manual if you don't understand something

 

Regarding specific php things you simply must know:

 

1. variables

2. sessions & cookies

3. interaction with database

4. while, foreach, for

5. if, else, switch

6. strings and arrays

7. classes and functions

8. objects and object oriented programming

9. includes

10. security

 

.. not in any specific order. The important thing is you plan an app you can build and then when you come up against a problem or how to do something you refer to GOOD learning materials to find a solution or ask here :)

 

You can get a quick overview of how to use php by searching the above items one at a time and putting php in front of them (maybe a date too ;) don't read outdated info).

 

"php includes"

"php security"

 

Don't forget, make sure you have your environment setup properly. Use latest version of php, apache and mysql and use a good editor (notepad++ is excellent).

 

Hope that helps!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.