explode and in_Array search not working

前端 未结 2 1853
抹茶落季
抹茶落季 2021-01-17 03:39

OK here is the code codepad here http://codepad.org/ZQz0Kn3R

function processContent($content, $min_count = 2, $exclude_list = array()) {
    $wordsTmp = ex         


        
2条回答
  •  被撕碎了的回忆
    2021-01-17 04:13

    The problem is because $filter_array has spaces in it. Either:

    $filter_array = array_map(function($el) { return trim($el); }, $filter_array);
    

    Or

    foreach ($filter_array as &$element) {
        $element = trim($element);
    }
    

提交回复
热议问题