Jump to content

handling weird symbols


mga_ka_php

Recommended Posts

Is the data getting "corrupted"? Do you have users on your site? If you do, they might be inserting the "weird characters". You could use the strip_tags(); function for it? You could use the ereg_replace(); function as well... that lets you limit your string to whatever you want. Ex: only letters and/or numbers... Here is a sample I found from a Google search...

 

ereg_replace("[^A-Za-z0-9]", "", $string); - this only allows letters and numbers.

 

I hope this helped!

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.