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?

Alive to die - Anant
  • 70,531
  • 10
  • 51
  • 98
DANLEE
  • 443
  • 1
  • 8
  • 25

1 Answers1

0

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

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