Answers for "explode get the first word in php"

PHP
0

php explode and get first value

$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

// PHP <= 5.3:
$beforeDot = explode(".", $string);
$beforeDot = $beforeDot[0];
Posted by: Guest on April-17-2021
0

php explode sentence into words

$words = explode(" ", $sentence);
Posted by: Guest on February-12-2021

Code answers related to "explode get the first word in php"

Browse Popular Code Answers by Language