K
K
Kogerma2015-11-17 13:54:18
PHP
Kogerma, 2015-11-17 13:54:18

How to select the last word in a sentence and display it?

The sentence can be anything, for example, Describe your question in detail to get a more accurate answer, display the answer, there are no punctuation marks at the end, there are no other conditions

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2015-11-17
@Kogerma

explode by spaces and take the last element of the array?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question