get last word from the strin gin php code example
Example: get last word from string php
function getLastWord($string)
{
$string = explode(' ', $string);
$last_word = array_pop($string);
return $last_word;
}
function getLastWord($string)
{
$string = explode(' ', $string);
$last_word = array_pop($string);
return $last_word;
}