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;
    }
Source by onecompiler.com #
 
PREVIOUS NEXT
Tagged: #word #string #php
ADD COMMENT
Topic
Name
7+3 =