$string="I have a ruler."; //利用preg_split拆分 $word=preg_split('/[\s]/',$string); //output I have a ruler.