I want to convert an array into JSON. My problem is that one of that elements in that array contain single quotes, double quotes etc.
<textarea name="description" id="description">
Tesla is the living definition of bad*** and mad scientist.
During Tesla's later years, he made claims concerning a
"teleforce" weapon after studying the Van de Graaff generator.
The press called it a "peace ray" or death ray. Tesla described
the weapon as being able to be used against ground-based infantry
or for antiaircraft purposes.
</textarea>
When I submit it I got:
$description = $_POST['description'];
json_encode($description);
When I decode it, I got only a part of string.