I'm totally new to mvc,how to pick it up?
First research the MVC pattern and look for tutorials that explain how to implement it. Next, get an MVC framework for PHP and use that since there's no sense trying to reinvent the wheel and roll your own.
Go this way:
- Know what is MVC
- Why it is useful
- How does it work
- Where it should be used optimally
- How do frameworks use it (if possible to know)
- Learn how frameworks implement it (try using a framework)
- Learn a framework so that you can become habituated to using MVC
I know I might sound foolish, but this way can be of great help to newcomers.
Go this way:
- Read about MVC (Google it, see the wikipedia article)
- Choose a Framework (I suggest CodeIgniter - Has a great user guide)
- Then go through the user guide and try the things.
The video tutorials are also good, check nettuts.com for CI.
Maintain some project written in spaghetti code (CSS + JS + HTML + PHP + SQL, all in one single file), then think how you would separate all these and you'll discover MVC.
Kidding aside. Read about it what you can, try some framework but don't avoid maintenance projects. It is in these projects that you'll see the benefits of MVC or at least those of separation of concerns.
See also this related question.
You can read all about MVC with a simple google search. However, you won't fully understand the beauty of it until you pick a framework and dive in. I hear great things of CodeIgniter. It was my first framework when getting into MVC.
In the end I chose CakePHP. Why? CodeIgniter, while very simple to get started with, gave me too much freedom for a beginner to MVC. I wanted strict rules and conventions to show me how its supposed to be done rather than what I think MVC should be. Maybe later on down the road I'll come back to CI. Either way you choose, my suggestion is to take a small project you coded, and code it in any of the PHP frameworks out there.
CakePHP's and CodeIgniter's communities are among the most helpful. Join a google group for Cake/CI. Read about what people are trying to do. See what problems people are having and good luck!