Jump to content

removing apostrophes


rcleon

Recommended Posts

If you want to remove ' from s users username use str_replace instead:
[code]$username = str_replace("'', '', $username);[/code]

If you want to remove other characters from the username, such as double quotes you can do this:
[code]$username = str_replace(array("'",'"'), '', $username);[/code]
Link to comment
https://forums.phpfreaks.com/topic/12784-removing-apostrophes/#findComment-49046
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.