Try the following:

    echo '['.$type.']';

to rule out the possibiliy of spaces around the word.

Cheers,
Rob.

cg wrote:
> 
> I am testing a var in a switch statement,
> switch($type)
>     {
>         case "HIRE":
>             statements;
>             break;
>         etc....
>             default:
>                 echo "In Default";
>             break;
>     }
> I can echo $type directly above the switch statement, confirm it contains
> the string "HIRE", but the switch takes the default every time!!
> 
> what is going on??
> 
> thanks
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

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

Reply via email to