Re: Using a list of (string) variables as preg_match result set?

From: Date: Fri, 05 Jan 2001 08:54:50 +0000
Subject: Re: Using a list of (string) variables as preg_match result set?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32852@lists.php.net to get a copy of this message
>> $str="I think this is a stupid example, but it shoud show what I want >> to know"; preg_match( "/(this) is a (stupid) example/", $str, >> list($whole,$first,$second) ); >It is two statements, but: > preg_match( "/(this) is a (stupid) example/", $str, $temp ); > list($whole,$first,$second) = $temp; >should work. Thanks, figured that out. Extending the possibilities of list() would be a nice addition in the todo-list. I'm not whining though, I should be helping :) -a

« previous php.general (#32852) next »