It turns out that I am sending a variable by the URL called $errors , which is where all the errors that the user has made are, and I am sending it by the URL to receive it on another page. The variable arrives very well without any problem, but it turns out that it is arriving in a very ugly way that is not pleasant for the user, so I would like to know if there is a function in PHP that helps me convert my variable $errors to convert it to a prettier, user-friendly URL, something like this: localhost:project/error-in-your-request
Something ugly right?
Friends I hope you can help me and I hope you have a great day.
Before sending it you can replace the spaces (which in the url are shown as %20) by a hyphen with
str_replace
.And if you're going to use it as text on the landing page, you can replace hyphens with spaces again with the same function.