View Full Version : iif

07 May 2002, 03:01
I'm making a hack, and I'm wondering how to use iff as VB does. This is what is in newreply.php:


Now, if I wanted to convert this:

if (getenv("HTTP_X_FORWARDED_FOR")!="") {

to use iff, would it look something like this:

I'm not quite sure, at the end of the one VB uses there is ,$HTTP_HOST. I'm not sure what to replace that with, or with anything at all.

Thanks :bunny: (I just love that bunny ^^)

Mark Hensler
07 May 2002, 07:48
If you've just got to use it, try just NULL.

07 May 2002, 08:40
Oh, thanks. Whats it for anyway?

07 May 2002, 14:09
iif() is used to shorten simple:
if (whatever) {
// whatever
} else {
// whatever

07 May 2002, 20:38
hehe, simmilar to the mirc iif then. Thankies you two!

Scott MacVicar
07 May 2002, 20:50
ooh another irc person what servers do you go on Takara?

Mark Hensler
07 May 2002, 20:53
it's also like the SQL version

07 May 2002, 20:57
Only on SQL it's just IF. :)

07 May 2002, 23:50
Originally posted by PPN
ooh another irc person what servers do you go on Takara?


I hang out in the Ragnarok Online chans, though Im just currently creating a new site/chan with a group of friends.