I have erased my iPhone completely and need to get the factory settings back on it so I can sell it,
Go to Correct Answer
Settings > General > Reset > Erase all content and settings.
before you sell it, it would be helpful to write down the IMEI number that can be found under Settings > General > About.
View solution in original post