Re: weird switch behaviour

From: Date: Tue, 24 Jun 2003 14:29:19 +0000
Subject: Re: weird switch behaviour
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152624@lists.php.net to get a copy of this message
Try it: switch($type) { case HIRE: statements; break; etc.... default: echo "In Default"; break; } "Cg" <colingresty@yahoo.co.uk> wrote in message news:20030618131802.18152.qmail@pb1.pair.com... > 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 > >

« previous php.general (#152624) next »