The original String

Im a Link text.

The String after being converted

<a href='#i_am_the_link_target'>Im a Link text</a>.

if you want to see the encoded characters you can always add it to a text areas.

you can also decode the entities with the following function

Im a Link text.<a href='#i_am_the_link_target'>Im a Link text</a>.

actually the one i was looking for here was htmlspecialchars_decode got there in the end!

Im a Link text.<a href='#i_am_the_link_target'>Im a Link text</a>.