Thanks for reaching out to the Apple Support Communities. I understand you've had some trouble with an intermittent Wi-Fi connection on your iPhone, and I have some information that may help.
Have a look at the article below for some helpful troubleshooting steps. It focuses on not being able to connect at all, but the steps should help with your intermittent connection as well. If you run into any trouble, or if the symptoms persist, please reach out again.