Jump to content

Preg_replace ™ and ®


reliablec

Recommended Posts

Hi everyone, I have a page where the ™ and ® are not displaying correctly. What I want to do is swap these values for the HTML codes ® and ™ respectively.

 

When I try:

 

preg_replace("/\™/", "™", $var_name);

preg_replace("/\®/", "™", $var_name);

 

These do not work. Does anyone have experience with swapping these symbols using preg_replace?

 

Or are there other tools out there that I could use to perform this function?

 

Your help is appreciated.

Thanks

Kent

Link to comment
https://forums.phpfreaks.com/topic/124395-preg_replace-%E2%84%A2-and-%C2%AE/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.