<?php $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); ?> 以上例程会输出: Array ( [0] => s [1] => t [2] => r [3] => i [4] => n [5] => g )
posted on 2021-06-30 15:39 头大的冯冯 阅读(53) 评论(0) 编辑 收藏 举报