RE: [PHP] Re: Like ternary but without the else.

2005-03-01 Thread Chris W. Parker
anirudh dutt mailto:[EMAIL PROTECTED] on Monday, February 28, 2005 9:25 PM said: dunno if u've read the options ppl have given u or u've ignored their answers: ugh... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Like ternary but without the else.

2005-02-28 Thread Chris W. Parker
Richard Lynch mailto:[EMAIL PROTECTED] on Monday, February 28, 2005 5:12 PM said: Course, I gotta say that maybe you're coming at this wrong in the first place, if you have to change $this based on $something to $that but $this already has a value... Maybe you should have figured out

RE: [PHP] Re: Like ternary but without the else.

2005-02-28 Thread Richard Lynch
Chris W. Parker wrote: Jason Barnett mailto:[EMAIL PROTECTED] on Friday, February 25, 2005 2:10 PM said: $this = $something ? $that : null; That won't work because I'm setting a default value for $this and want it to change only if it has to. The long winded way to write this would be:

RE: [PHP] Re: Like ternary but without the else.

2005-02-28 Thread David Robley
Chris W. Parker wrote: Richard Lynch mailto:[EMAIL PROTECTED] on Monday, February 28, 2005 5:12 PM said: Course, I gotta say that maybe you're coming at this wrong in the first place, if you have to change $this based on $something to $that but $this already has a value... Maybe you

Re: [PHP] Re: Like ternary but without the else.

2005-02-28 Thread anirudh dutt
dunno if u've read the options ppl have given u or u've ignored their answers: imho, these are the answers to ur question: On Sat, 26 Feb 2005 00:46:36 +0100, rich [EMAIL PROTECTED] wrote: is this what you're after? $this = ($something ? $that : $this) rich On Fri, 25 Feb 2005

RE: [PHP] Re: Like ternary but without the else.

2005-02-25 Thread Chris W. Parker
Jason Barnett mailto:[EMAIL PROTECTED] on Friday, February 25, 2005 2:10 PM said: $this = $something ? $that : null; That won't work because I'm setting a default value for $this and want it to change only if it has to. The long winded way to write this would be: ?php $myVariable =