Snippet shows you how to fix url query parameters starting with "&" instead of "?". This can be useful when you have to use "parse_url" function. It cannot detect query parameters when they start with ampersand instead of question mark. Since browsers are working with different logic, you might need this "hack".
Source code viewer
// Hack for false urls, where query parameters start with "&" instead of "?". // Count on str_replace accepts only variable, not a direct integer. $count = 1; }Programming Language: PHP