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

2005-03-01 Thread Chris W. Parker
anirudh dutt 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 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 200

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

2005-02-28 Thread David Robley
Chris W. Parker wrote: > Richard Lynch > 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... >>

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

2005-02-28 Thread Richard Lynch
Chris W. Parker wrote: > Jason Barnett > 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 w

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

2005-02-28 Thread Chris W. Parker
Richard Lynch 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

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

2005-02-25 Thread Chris W. Parker
Jason Barnett 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: Chris. -- PHP Gener

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

2005-02-25 Thread Jason Barnett
Chris W. Parker wrote: > Hello, > > I couldn't find this anywhere on google or PHP's site but I'm pretty > sure there's an answer to it. > > How can I turn the following into something that resembles the ternary > operator? > > > if($something) > { > $this = $that; > } > > ?> > $t