/* 4.$m = “woxihuanphp”,编程实现:将字符串分割为单个字符存放到一个数组中,并打印数组? */ $m=‘woxihuanphp‘; echo $res=trim(chunk_split($m,1,‘.‘),‘.‘); $arr1=explode(‘.‘,$res); var_dump($arr1);
字符串转成数组
原文:https://www.cnblogs.com/huay/p/10369529.html