Bezmir, it totally depends on what you want to do with them. If you want to just play in 3.5 games, the PHB is all you need. You
could go with the DMG as well, since it is really helpful in choosing magical items, and it has some prestige classes in it that you might enjoy. But you really only need the PHB as a player, as long as your DM knows what he's doing.
If you're looking to run an adventure, I'd recommend buying the DMG and the Monster Manual. You don't need any other books than those three to have a great time and create countless adventures.
For 2nd edition, the same things apply, but you don't need the DMG at all as a player. Again, as a DM you'll need all three.
All other books can be a lot of fun, but buying them is a big step if you don't have any experience using the first three. What I mean with that is this: many of these books (in my opinion) hold a few cool new additions to the game, but they are not necessary to enjoy yourself. Things like class-specific books, tomes of magic, PHB2 or campaign books are all extra, and not all of them are worth buying. Take a good look inside (if you can) before purchasing those.
Hope that's helpful.