I guess I was just hoping some such thing existed and I was too stupid to
find it...

Obviously there are plenty of ways to DO it, I just thought I couldn't find
something that was obvious!  How happy I am to know that it just doesn't
exist  :)

It really had less to do with execution time or readability than with my
desire to know everything...

Thanks everyone for sending answers,

John 

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.


> -----Original Message-----
> From: Tom [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 5:14 AM
> To: Asendorf, John
> Cc: Php-Windows (E-mail)
> Subject: Re: [PHP-WIN] Simple question that I can't find the answer to
> 
> 
> Depends on why you want to lop it down to a single line? Is 
> this to make your
> code tidier, or to improve execution time (the latter I 
> doubt, as it won't
> take long to perform the code you describe!).
> The neat solution would obviously be  a function (maybe even 
> in javascript!)
> that takes the parameters date1 and date2 and does the following: -
> 
> if $date1 > $date2 {
>     $sql_date1 = $date1;
>     $sql_date2 = $date2;
>     }
> else {
>     $sql_date1 = $date2;
>     $sql_date2 = $date1;
>     }
> 
> "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"
> >
> > Thanks in advance,
> >
> > John
> >
> > ---------------------
> > Founder of
> > The 'What Kind of Idiot Uses PHP with IIS with Oracle on 
> NT?' Consortium
> >
> > Members: John Asendorf, Thomas Kryger, Florian Clever, Ron 
> Woods, Bod
> >
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> >
> > Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur.
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to