Re: [PHP] weird switch behaviour

2003-06-26 Thread Miles Thompson
Try cleaning it up ... switch( trim( strtoupper( $type ) ) ); I had this happen to me - the $type echoed OK, but would not get caught in the "case". The above fixed it. Miles Thompson At 02:18 PM 6/18/2003 +0100, cg wrote: I am testing a var in a switch statement, switch($type) { cas

Re: [PHP] weird switch behaviour

2003-06-24 Thread Robert Cummings
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 > de