if you use
list($one,$two,$three,$rest) = preg_split("/\s+/", $text, *4*);
you get the remaining elements in $rest as a single string

samug wrote:

Thanks.
But what if you don't know how many elements there will be ahead?

"Samug" <[EMAIL PROTECTED]> kirjoitti viestissä
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Could someone tell me why isn't this working?

$text = "And what did I tell you?";
list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
print($rest);

The result would be "I" and not "I tell you?"
Why?







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to