'how to remove particular text from request url

My request url like this

localhost/details?hotelid=2--tag&checkin=2022-05-13&checkout=2022-05-15&room=1

i want to like this

localhost/details?hotelid=2&checkin=2022-05-13&checkout=2022-05-15&room=1

how to remove from url only --tag

php


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source