I would avoid the Zend key / value approach mentioned above. The problem is that creating three different URLs becomes trivial.
http://www.example.com/controller/action/var1/value1/var2/value2 http://www.example.com/controller/action/var2/value2/var1/value1
pointing to the same resource. While this works, part of the success of MVC style frameworks for web applications is that they make it easy to provide a clean URL structure and link one URL on your site to each resource. The var1 / value1 / var2 / value2 method has few advantages over key / value query strings.
The approach I'll take here is to drop the keys and just use the values
http://www.example.com/example/list/value1/value2/value3
which will be passed to the action method as an array
class example extends Controller{ public function list($args){
By doing this in this way, you leave it to the end users of your system to decide how they want to handle $ GET style variables while encouraging a design that results in cleaner, more stable single-resource URLs.
source share