过滤掉空格

foreach ($data as $key => $val) {
                $values = preg_replace("/(\s|\&nbsp\;| |\xc2\xa0)/", "", $val);
                $dataArr[$key] = $values;
            }

你可能感兴趣的:(过滤掉空格)