文字列を分割<pre class="brush:php;toolbar:false">
php > $x="xy\nw";
php > echo strlen($x);4
str_split
'xynw'.match(/(.{1})/g)
さあ
js🎜🎜<?php $str = 'xynw'; $chars = preg_split('//', $str, -1,PREG_SPLIT_NO_EMPTY); print_r($chars);?>