Just looking for opinions/comments of how others are working with 
switch() while register_globals is off....

With register_globals off, switch() has a little handicap.
ie
switch($foo)
{
    ....
    break;
}

$foo, is now illegal/not set.  So far, I've been using this before 
switch statements.

if (isset($_POST['foo']))
{
    $foo = $_POST['foo'];
}
elseif (isset($_GET['foo']))
{
    $foo = $_GET['foo'];
}
else
{
    $foo = FALSE;
}

Works for me.  Ill probably turn it into a function so I dont type as 
much :)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to