help with passing arguments to function

前端 未结 6 1119
慢半拍i
慢半拍i 2020-12-06 23:49
function get_tags_by_criteria($gender=\"%\", $min_age_of_birth=\"%\", $max_age_of_birth=\"%\", $country=\"%\", $region=\"%\", $city=\"%\", $tag=\"\") {
6条回答
  •  一个人的身影
    2020-12-07 00:41

    The CakePHP framework often uses associative arrays to specify a set of options. It will even let you specify either individual parameters or an associative array. See the find methods on the model class as an example.

    Here's my attempt at making your function more flexible:

    
    

    'ca', 'tag' => 'sample')); ?>

提交回复
热议问题