Hi there !!

i am here seeking for best way to learn php, i enrolled to one course but i am not feeling confortable with the method that the teacher is teaching me. I ma sure that i can learn it by solving problems. Help please.

Hi I don't know if this is the best way but I recommend that you give it a try www.codecademy.com. It goes from the basics to more advanced stuff.

First be ready to run PHP (XAMPP WAMPP or whatever) then a decent PHP IDE (Eclipse , Netbeans , PHPstorm ... what ever). Read many tutorials and on line books (don't take every word for granted if you don't test it). Decide a test project and start working with that.

Member Avatar for diafol

Learning anything effectively is a complex and highly individual process. There are many, many ways to learn a language like PHP. How do you learn best? Only you can answer your own question.

+1 diafol , learning how to learn efficiently is the key point in any science , but this is rather a mature statement. When you are just starting and want to know all without any knowledge of how to accomplish them , it is difficult to stop and think that the key point is to learn how to learn. Of course having the right environment to run PHP , a decent IDE and a project to start with , are needed.

commented: Quite right jkon +15
Member Avatar for diafol

Perhaps if I venture to add a few possible ways:

STACK
Install a ready-made stack like XAMPP. XAMPP will give you amongst other things, Apache webserver, PHP and MySQL - pretty much all you need to get going. There are other stacks out there, but XAMPP pretty much fits the bill with regard to the beginner.

EDITOR
You'll need a code editor or even an IDE as mentioned - again there are many on offer. We recently had a bit of a discussion about this on the PHP forum: https://www.daniweb.com/web-development/php/threads/493244/your-favourite-ide-or-editor-for-php

The thread mentions Sublime 3, PHPStorm, Eclipse and many others. Some are "free to use", while others are fully commercial. If your're just starting out and don't want the complexity of an IDE, then maybe Sublime 3 would fit the bill. Notepad++ is also a pretty nice standard code editor, without too many distracting bells and whistles.

TUTORIALS AND INFO
This is where you need to invest some time - getting to know the basics. As a beginner, you may feel lost in a sea of information with all the various tutorials. It can be quite daunting.
However, bookmark a number of resources that you can dip into quickly when you come across something you don't understand. My main go-to reference is, unsurprisingly, the PHP manual (php.net). I'd say 90% of my solutions come from this. WHat I can't find there, I get from Daniweb, StackOverflow and various other forums.

I tend to learn best from textbooks - yes I am that old! A good textbook will have a structured approach and may have end of chapter tests and summaries. It will also have a nice, concise Google page of its own - the Index! This saves so much time compared to some random search that kicks up so much excrement. Then you have video tutorials. These suit a lot of people as we tend to love visuals. Unless they're accompanied by some static text or downloadable code, vidorials can be a bit awkward. Of course, there are the random tutorials all over the web - some are truly great, some are shockingly bad.

The problem with online material is that it isn't peer-reviewed as a rule, so any a###-wipe can write a tutorial. I should know - I've written a few.

Whatever method you follow, remember that you MUST have access to the latest code. Tutorials can be 3 years old and be out of date with regard to deprecated functions. Take mysql_* functions for instance.

I never had a teacher to show me how to code properly. I wish I had. Teachers can only do so much though. With a coding course, you will be expected to do the majority of the work yourself, so keep that in mind.

some good advise here, all I can add is after you get the basics, focus on OOP. Learn how to use objects appropriately. Save your self from learning bad habbits. OOP will teach you how to focus more on the scope of your projects and not just a piece of code at a time.

If you are a person who learns best by text the codeacademy or w3schools can help. But if you learn best by video, then I recommend the video playlist on phpacademy channel on youtube.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.