0

I had an issue. I do not want to insert to the database.

Because when reading the it will turn out with funny character.

Is there a way to prevent or encode to ' when inserting to MySQL?

Anant Kumar Singh
  • 68,309
  • 10
  • 50
  • 94
DANLEE
  • 433
  • 1
  • 7
  • 24

1 Answers1

0

If you just want to replace that specific string why not just doing:

$encoded = str_repace("’","'",$input);
Jose Garrido
  • 722
  • 1
  • 15
  • 31