In following formular,
exp ? statement1 : statement2
if exp is true, statement1 is excuted, else statement2 is excuted.
So it is equivalent to:
if( exp ) {
statement1
} else {
statement2
}
If you still want to ask what "?" means, I think it can be "if exp is true".
Alex
----- Original Message -----
From: "Sall Him" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 4:44 PM
Subject: Re: [PHP] what does this line means? Many thanks
> thanks, another question is what does the ? means in this line?
>
> Alex Shi wrote:
> >
> > strstr($str, $needle) returns a substr start from first occurance of
$needle
> > in $str to the end of $str.
> >
> > strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","") :
> > $SBMT_CNDTNS[] = $value;
> >
> > equivalent to:
> >
> > if( strstr($value, "VLD:") !="" ) {
> > $VLD_CNDTNS[] = strtr($value,"VLD:","");
> > } else {
> > $SBMT_CNDTNS[] = $value;
> > }
> >
> > This kind of express is borrowed from C.
> >
> > Alex
> >
> > ----- Original Message -----
> > From: "Sall Him" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 05, 2001 3:35 PM
> > Subject: [PHP] what does this line means? Many thanks
> >
> > > strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","")
:
> > > $SBMT_CNDTNS[] = $value;
> > >
> > > --
> > > PHP General 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 General 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 General 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]