I have a URL like http://example.com/size/large/color/red. How can I convert the URL into an associate array so that I end up with:
$my_array("size" => "large", "color" => "red");
Bear in mind, that the URL could look like http://example.com/color/red/size/large/type/round. So basically, the keys and values could be anything. But they key will always be followed by the value.
1 Answer