<?php $sentence = '練馬春日町Ⅳ 清掃レポート.pdf'; $first_word = mb_split('\p{Z}', $sentence); echo $first_word[0]; // Use preg_match() function to get the // first word of a string preg_match('/^\w+/iu', $sentence, $result); // Display result echo "\nThe first word of string is: ".$result[0];
You have javascript disabled. You will not be able to edit any code.