Re: Re: preg_split problem

From: Date: Sat, 09 Nov 2002 18:09:48 +0000
Subject: Re: Re: preg_split problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123601@lists.php.net to get a copy of this message
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" <samug@vectorstar.net> kirjoitti viestissä news:20021109165530.58233.qmail@pb1.pair.com...
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?


« previous php.general (#123601) next »