Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get last word from string php

function getLastWord($string)
    {
        $string = explode(' ', $string);
        $last_word = array_pop($string);
        return $last_word;
    }
 
PREVIOUS NEXT
Tagged: #word #string #php
ADD COMMENT
Topic
Name
3+9 =