-3

How do I slice a sentence of any length into arrays of say 5 words?

In other words:

$Dummy = "Here is  a long sentence, but what I need to make out of this sentence 
          is that it should be chunked off to smaller arrays with 5 words each."

I want the answer in PHP.

Thanks in advance for the one who solves it.

4

1 に答える 1