What are the array skills of array_map
This article introduces you what array_map array skills are, the content is very detailed, interested friends can refer to, hope to be helpful to you.
# get the list of home owners $home_list = Model::home_users ()-> selectBySql ('select h.homeowners from home_users as hu left join home as h on hu.home_id = h.home_id where hu.user_id=?', [$this- > token_info [' id']]) Output: [['home_id'= >' 1], ['31'], [' home_id'= >'2]; # messages $msg = self::readMsg (['user_id'= > $this- > token_info [' id'], 'home_id'= > $homes,' read_type'= >'r']) Return: [['home_id'= >' 1], ['home_id'= >' 2]; $new = array_map (function ($hdepartment accountm) {return array_merge ($hJournal accounm);}, $home_list,$msg) Return: Array ([0] = > Array ([home_id] = > 1 [home_name] = > Home 1 [count] = > 31) [1] = > Array ([home_id] = > 2 [home_name] = > Home 2 [count] = > 24) about array_ So much for sharing map's array skills. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.