For example :
If the string contain $a= &foo foo
When I encode it using the function
encode_entities($a);
The should not be encoded.
So the final output after encoding should be
&foo foo
Now the output is
&foo foo.
So I wanted to check it the string is HTML entity?