Answers for "php find last function before funtion"

PHP
1

get last word from string php

function getLastWord($string)
    {
        $string = explode(' ', $string);
        $last_word = array_pop($string);
        return $last_word;
    }
Posted by: Guest on February-26-2021
0

php last of string till /

$string = 'Hello World Again';
$string = explode(' ', $string);
array_pop($string);
$string = implode(' ', $string);
Posted by: Guest on November-07-2019

Browse Popular Code Answers by Language