I thought I'd share this in case anyone else ever needs to extract music from an iPhone.
There could be a number of reasons you'd need to. e.g.: no longer have the music on your computer but need to restore your iPhone, or you're switching to an Android or Windows Phone and want to take your music with you etc. Or in my case, if you have too much music to sort through, so it would be easier to extract all your iPhone's music to one location, to restore after. But anyway, this program allows you to copy music back from your iPhone to PC.
It's called SharePod and works with basically all iDevices, as long as iTunes is installed and up to date on the same PC (for drivers etc). Simply connect your iPhone to the computer, close iTunes if it's open, and launch SharePod. It will detect your iPhone and show you all the music on it. From there you can copy any or all your tracts to your PC, and can specify how to name the files, and where to save.
When I use it, I usually just dump all my tracks to a folder on the desktop, restore the iPhone, then it's a simple click and drag of the folder into iTunes to put everything back on the iPhone.