How to transfer iPhone music to iTunes (windows 7)?

I had to format my computer yesterday. I have all my music folders back on my PC, it's alright. But I have all my musics on my iPhone too, and I wanted to know if it's possible to transfer back on my fresh new iTunes all my musics from my iPhone (so my album/playlists/etc stay the same as in my old iTunes)?

thank you!

Added (1). @mnmboy
Isn't the synch for iTunes- iPhone? Because what I need is iPhone- iTunes. But I guess you explain that with the "safe side" part, which I didn't understand xd

@Harper
I don't want to put music on my iPhone, I want to put y iPhone music on my iTunes… Thank you anyway!

If your iTunes library and iTunes Store authorizations are fully intact again, simply connect your iPhone and/or iPod to your computer and synch away. To be on the safe side, play some of your songs in iTunes before synching… If the playback is fine you will be good.

1. Open iTunes. Open the Edit menu on Windows or the iTunes menu on a Mac. Click the "Preferences" option. Make sure the "Disable automatic syncing for all iPhones" check box is selected.
2. Plug your iPhone into the computer and wait for iTunes to recognize it. Click on your iPhone's icon on the right side of the iTunes window. Click the "Music" tab.
3. Select the music you want to sync to your iPhone using playlists. You can also select the option to sync all your music to the iPhone. Click the "Video" tab.
4. Select the option to sync all videos or manually manage them just like your music. Click "Sync" when you're done customizing your settings.

Yes, you can do that with a little help from some third-party iPhone transfer. I do this kind of thing all the time using Syncios. You can google it find one iPhone Transfer you like. Some of them are totally free.
Take free iphone transfer Syncios for example:

1. Download and install Syncios on your pc.
2. Connect your iphone with pc.
3. With the help of Syncios, transfer music from iphone to pc. Then add them to your new iTunes library according to your need.

This tutorial may be helpful for you
http://www.syncios.com/how-to-transfer-music-from-iphone-4s-to-computer.html