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