关于array_walk 为什么是这样解决思路

WBOY
Release: 2016-06-13 13:45:57
Original
830 people have browsed it

关于array_walk 为什么是这样

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$kk=array(' chen ','wei ',' kyle');
    $kk=array_walk($kk, create_function('&$item','$item = trim($item);'));
    print_r($kk);
Copy after login


为什么打印结果是1呢?


------解决方案--------------------
array_walk($kk, create_function('&$item','$item = trim($item);'));
print_r($kk);


删掉赋值
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template