Question : Having a problem json encoding a string with quotes

Hello I am json_encoding a string to send it as an argument from PHP to a Javascript function. But I get a null value once I json encode it. Is there a way to bypass and get this string to javascript. I tried it without json encoding, but I get an error

The string that I need to json encode to javascript is  " Handsets/Devices -Without CD  - 4.5” W x 6.5” H x 1.75” minimum to 3.75” maximum D (114.3mm W x 165.1mm H x 44.45mm minimum to 95.25mm maximum D) ".

Answer : Having a problem json encoding a string with quotes

Else try this too :

1:
2:
var regex = new RegExp("\u0094", "g")
answer = answer.replace( regex, String.fromCharCode(34) );
Random Solutions  
 
programming4us programming4us