Answers for "how to get the first word from a string php"

PHP
19

php get first character of string

$firstStringCharacter = substr("hello", 0, 1);
Posted by: Guest on October-19-2019
0

php get first word of string

$value = "Test me more";
echo strtok($value, " "); // Test
Posted by: Guest on January-30-2022

Code answers related to "how to get the first word from a string php"

Browse Popular Code Answers by Language