View Single Post
Old 10-16-2012, 10:11 AM  
ProG
Confirmed User
 
Join Date: Apr 2009
Posts: 1,319
I think you guys missed the "Using all combinations" part

Code:
// URL http://www.domain.com/?colors[]=Red&colors[]=Blue&colors[]=Green&colors[]=Yellow&animals[]=Fish&animals[]=Dogs

parse_str($_SERVER['QUERY_STRING'], $values);
foreach($values['animals'] as $animal) {
	foreach($values['colors'] as $color) {
		echo "This page is about selling " . $color . " " . $animal . PHP_EOL;
	}
}
__________________
History will be kind to me for I intend to write it.
ProG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote