benphelps Posted October 20, 2008 Share Posted October 20, 2008 I need to replace an ASCII character with an HTML tag. This string would be formatted like this: \x02 String to be inside tag \x02 this should not be in the tag I know i can do this with str_replace(chr(02), '<htmltag>', $string) The above would print this <htmltag> String to be inside tag <htmltag> this should not be in the tag I need it to pring this: <htmltag> String to be inside tag </htmltag> this should not be in the tag How can I finish the html tag? Link to comment https://forums.phpfreaks.com/topic/129167-replace-ascii-character-with-proper-html-tag-format/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.