Can you un-jailbreak an iPhone?

Via macplace10 @ macrumours:
"In order to 'Vanilla' / unJailbreak an iPhone you must Restore it in iTunes then, perform an "Erase All Content and Settings" then, setup as 'New iPhone’ in iTunes.
Residual jailbreak files will be visible to the Genius Bar if you ONLY 'Restore.'
Restore it to factory setting then sync it with your computer and all apps will come back.

To Restore iPhone using the latest version of iTunes.
• Connect iPhone.
• When it appears in the Source list, click on Restore in the Summary tab.

To Erase All Content and Settings:
• On iPhone, Tap Settings > General > Reset > Erase All Contents and Settings
Note: This will delete all media and data. All settings will be reset as well. "

Via macplace10 @ macrumours:
"In order to 'Vanilla' / unJailbreak an iPhone you must Restore it in iTunes then, perform an "Erase All Content and Settings" then, setup as 'New iPhone’ in iTunes.
Residual jailbreak files will be visible to the Genius Bar if you ONLY 'Restore.'
Restore it to factory setting then sync it with your computer and all apps will come back.

To Restore iPhone using the latest version of iTunes.
• Connect iPhone.
• When it appears in the Source list, click on Restore in the Summary tab.

To Erase All Content and Settings:
• On iPhone, Tap Settings > General > Reset > Erase All Contents and Settings
Note: This will delete all media and data. All settings will be reset as well. "

No.
You need to restore generic firmware via iTunes. There are more complicated ways to do it, but they haven't worked well for me in the past. Anyhow, resetting everything on the phone will leave it jailbreaked.