[thelist] ASP equivalent of $var = ($a == 0) ? 'hello' :'goodbye';
James Aylard
evolt at pixelwright.com
Wed Dec 10 16:04:54 CST 2003
Kristof Neirynck wrote:
>>> Is the an ASP equivalent of PHP's syntax:
>>>
>>> $var = ($a == 0) ? 'hello' : 'goodbye';
>>
>> If there's a cool 'immediate if' shortcut like the PHP versoin, I'd
>> love to know it.
>
> This should work.
>
> Dim var as String
> var = iif(a = 0, "Hello", "goodbye")
But not in VBScript...
James Aylard
More information about the thelist
mailing list