basically, you are doing this comparison :
if (0 == 'readmore') {
// ...
}
Which means 'readmore' will be converted to an integer ; and 'readmore', converted to an integer, is 0.
See Type Juggling in the manual, about that, and also String conversion to numbers, which states (quoting) :
If the string starts with valid
numeric data, this will be the value
used. Otherwise, the value will be 0
(zero).
You might want to use the === operator, which will prevent that kind of conversion :
if($root === "readmore") {
// You will not enter here, if $root is 0
}
See Comparison Operators.