Can you force an iPhone to use wifi instead of 3G?

Question: Can you configure an iphone 4 so that it always uses a wireless internet connection for web access when one is available, as opposed to using the iphone's built-in 3g internet access (and being charged for it on your mobile plan)?

Answer: iPhones are already set up to automatically connect to "known" wireless networks when one is available. This means that once you've connected to (joined) a wifi network then your iPhone will remember that network in the future, and will automatically use the wifi network instead of 3g.

You can also set your iphone to ask you to join any networks it sees, giving you the choice to join or ignore those networks. This can be a little annoying if you're roaming around in an area where there are a lot of wifi access points, so I usually turn that off.

To configure your wifi settings, tap "Settings" and then "Wi-Fi". You'll see an option to "Ask to Join Networks" at the bottom. Turn this setting on and you'll have full control - you'll get notified when there's a wireless network available, and you'll get to choose whether you want to join it or not.

It seems to me that you didn't answer the question. The OP (and I do to) wants to know how to ensure the phone uses wifi when available, even if 3g is also available.

You reversed the question in your answer. Not how to use wifi. But how to stop the phone from using cell phone data plan for downloading when a wifi connection is right there, or you do not need the data and can wait. Does the iphone autoconnect and download data (email with heavy attachements for example) and use up you plan when you prefer to manually ask it to do this. My 3g phone asks if I want to connect to 3g ("uses battery") but the inference is it will connect to the lower speed network and also download...? True?