Re: Simple question that I can't find the answer to

From: Date: Fri, 12 Jan 2001 20:29:15 +0000
Subject: Re: Simple question that I can't find the answer to
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4956@lists.php.net to get a copy of this message
At 14:19 12.01.2001 -0500, Asendorf, John wrote:
Is there a single line of code to do the following? I'm trying to interchange two variables' contents... I can do it with the following, but I was just wondering... I can't find it if there is... $a = "abc"; $b = "def"; $temp = $b; $b = $a; $a = $temp; //now $a = "def" and $b = "abc"
the question would be why you have to exchange the variablenames, maybe you can use variable variables $$ or ${}. i depends on what you want to do. daniel /*-- daniel beulshausen - daniel@php4win.de using php on windows? http://www.php4win.de

« previous php.windows (#4956) next »