php question

Got Haggis?

Veteran XX
okay this is really strange..probably something stupid...but its driving me crazy.

basically i am reading a text file and have the possibilty of 3 different types...

"A WARNING IS IN EFFECT"

"A WATCH IS IN EFFECT"

"INFORMATION BULLETIN"

those phrases are located in the text file...and i can get them with no problem...i get them into an array (using regex stuff) - basicaly i want to trim it down so i have something like

if ($type == "A WARNING IS IN EFFECT")
{ $nType = "WARNING"; }
...
...
else { $nType = "UNKNOWN"; }

now...what is going on here....everytime i run the script, the nType is set to UNKNOWN....yet i have even done a string comparison on $type and $nType and they are the same.....!?!?!?! am i doing something wrong?
 
Back
Top