$ConfirmCode = (isset($_GET['ConfirmCode']) ? $_GET['ConfirmCode'] :
  '');
I agree that this is really a PITA, but until we get an operator for this,
we should stuck on the ternary.


Another option is to use settype(); This has two advantages. One, if the variable does not exist, settype creates it with an empty value of the given type. Second, if it does exist, it can semitypecast them for you.

settype($_GET['ConfirmCode'], "string");

or

$ConfirmCode = $_GET["ConfirmCode"];
settype($ConfirmCode, "string");

Brian Moon
dealnews.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to