Re: preg_split problem

From: Date: Sat, 09 Nov 2002 17:21:39 +0000
Subject: Re: preg_split problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123597@lists.php.net to get a copy of this message
list throws away the other two array elements, you need list($one,$two,$three,$rest) = preg_split("/\s+/", $text, 4); samug wrote:
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 (#123597) next »