<?php
 $str = '我住在3号楼A座';
 $list = array();
 $start = 0;
 $lengh = mb_strlen($str,'utf8');//这里可以是指定的长度
 while (count($list)<$lengh) {
 $list[] = mb_substr($str, $start,1,'utf8');//也可以用$list .=
 $start++;
 }
 print_r($list);
 ?>

标签: none

评论已关闭