views:

46

answers:

1

I'm trying to figure out why a variable isn't triggering a conditional that it should. var_dump reports something like this:

string(20) "0"

Why is it reporting a length of 20 when the length is clearly 1?

+5  A: 

It might be rendering html. i.e. var_dump('<p class="abc">0</p>') would output string(20) "0" to the naked eye

Mike B
+1 Good guess!⁠
Gumbo