I want to insert text with html entities within it but I am having a problem inserting characters such as & etc. I don't know if it is problem with my character set or if it is because I am not escaping my special characters. My current character set is UTF8, this is set in my db, where I open my connection and at the top of my html document.

When I try to insert an & sign it simply ignores it and anything that comes after it.

I need a script that inserts the character and does not need any code to present it once it is inserted. For instance I dont want to have to do this:

PHP Code:

echo cleanEntities($string); 
SO effectively I do not want to have to 'unescape' when I read from the DB. Once it is inserted I want that to be it. I can then display it anywhere without having to decode it.

Any suggestions?

Thanks in Advance,