<?php
$string = "How old are you.";
$Result1 = str_split($string);//每個字元切割
$Result2 = str_split($string, 3);//每3個字元切割
print_r($Result1);
echo '<br>';
print_r($Result2);
?>
$string = "How old are you.";
$Result1 = str_split($string);//每個字元切割
$Result2 = str_split($string, 3);//每3個字元切割
print_r($Result1);
echo '<br>';
print_r($Result2);
?>
以上程式碼為PHP str_split 函數的範例程式碼。