Re: Assigning one var to multiple vars

From: Date: Thu, 09 Sep 2004 20:56:19 +0000
Subject: Re: Assigning one var to multiple vars
Groups: php.general 
Request: Send a blank email to php-general+get-196259@lists.php.net to get a copy of this message
$var2 = $var3 = $var5 = "all the same"; Jason "Matthew Sims" <matt@killermookie.org> wrote: > > > Just mostly curious but is there a way to assign one variable to multiple > variables in one single line? > > Rather than do this: > > $var2 = $var1; > $var3 = $var1; > > Is there a method to perform a: > > ($var2,$var3) = $var1; > > -- > --Matthew Sims > --<http://killermookie.org> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#196259) next »