Answers for "find first alphabet of sentence in string php"

PHP
1

get first word from string php

function getFirstWord($string)
    {
        $arr = explode(' ', trim($string));
        return isset($arr[0]) ? $arr[0] : $string;
    }
Posted by: Guest on February-26-2021

Code answers related to "find first alphabet of sentence in string php"

Browse Popular Code Answers by Language