I'm looking for the name of the PHP function to build a query string from an array of key value pairs. Please note, I am looking for the built in PHP function to do this, not a homebrew one (that's all a google search seems to return). There is one, I just can't remember its name or find it on php.net. IIRC its name isn't that intuitive.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
You're looking for |
|||||||||||||||||||||
|
Here's a simple php4-friendly implementation:
|
|||||||||||||||||||||
|
I'm not aware of a builtin function, but there is the PECL class http://uk.php.net/manual/en/class.httpquerystring.php |
|||
|
Implode will combine an array into a string for you, but to make an SQL query out a kay/value pair you'll have to write your own function. |
|||||||||
|
but for inverse this work, you can use :
Good luck. |
|||
|