Maison > Questions et réponses > le corps du texte
请问用哪个函数将下面的字符串截取后面两项并转换为数组?
<?php
$week = "Monday,Tuesday,Wednesay,Thursday,Friday,Saturday,Sunday";
?>
ringa_lee2017-04-10 16:15:38
$result = array_splice( explode(',', $week), -2 );
var_dump($result);