Re: http_build_query ... argh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jochem Maas wrote:
function inputPostQueryUnBorker($s)
{
        return preg_replace('#(\?|&(?:amp;)?)([^=]*)=#eU',
                            "'\\1'.str_replace(array('%5B','%5D'), array('[',']'), '\\2').'='",
                            $s);
}

so how bad is it
This is a bit more concise. I doubt there'd be a noticable difference in speed though:

return preg_replace('#%5[bd](?=[^&]*=)#ei', 'urldecode("\0")', $s);

Arpad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux