Answers for "laravel select only one word from string"

PHP
0

laravel select only one word from string

$myvalue = 'Test me more';
$arr = explode(' ',trim($myvalue));
echo $arr[0]; // will print Test
Posted by: Guest on January-04-2022

Code answers related to "laravel select only one word from string"

Browse Popular Code Answers by Language