function get_tags_by_criteria($gender=\"%\", $min_age_of_birth=\"%\", $max_age_of_birth=\"%\", $country=\"%\", $region=\"%\", $city=\"%\", $tag=\"\") {
Unfortunately you can't do this - unspecified optional arguments always have to be at the tail end of a function argument list. Instead, what you can do is use NULL for the arguments you don't wish to specify and then have your function check to see if an argument is NULL and assign it the default value instead.