<?php $array = [ 'field1' => 'this one is ok, "double quotes" are escaped automatically', 'field2' => 'But line breaks are not and so they ruin json' ]; echo str_replace(PHP_EOL,"\n",json_encode($array));
You have javascript disabled. You will not be able to edit any code.