we have that string:
\"I like to eat apple\"
How can I obtain the result \"apple\" ?
\"apple\"
Try this:
$array = explode(' ',$sentence); $last = $array[count($array)-1];