I have 2 strings, when I do var_dump()
I see one string is 5 characters longer than the other one.
I guess this is because in the first string, the '
(quote) is seen as '
or '
(but I am not sure about this).
string(15) "i'm a bird"
string(10) "i'm a bird"
I want the first string to have 10 chars aswell.
I already tried htmlspecialchars()
, htmlspecialchars()
with ENT_QUOTES
, htmlspecialchars()
with ENT_NOQUOTES
, utf8_decode()
, utf8_encode()
, ...
It still stays a string(15)
.
Someone knows how to do it?
EDIT: @ Mathieu Imbert: When I look at the page source, I see it like this:
string(15) "i'm a bird"
SOLUTION:
EDIT: Thanks PeeHaa !! You code @ http://codepad.viper-7.com/pvHCwH fixed it!
html_entity_decode($title, ENT_QUOTES);
See Question&Answers more detail:os