...

View Full Version : A '?' in a string.



SDP2006
04-17-2004, 01:40 PM
I've been meaning to ask, but what does a '?' in a string do? Such as

isset($_GET['this']) ? $thisDir = base64_decode($_GET['this']) : $thisDir = '.';
Thanks

raf
04-17-2004, 01:49 PM
it's just an alternative syntaxform for


if (isset($_GET['this'])){
$thisDir = base64_decode($_GET['this']);
} else }
$thisDir = '.';
}

if you're concerned about your cyberspace-credabality as a nerd, then use it.
if you're concered about the readebility of your code, then better use


$thisDir = '.';
if (isset($_GET['this'])){
$thisDir = base64_decode($_GET['this']);
}

SDP2006
04-17-2004, 07:25 PM
it's just an alternative syntaxform for
if you're concered about the readebility of your code, then better use
LOL!!

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum