<?php $data = ["Single 'quotes' and double \"quotes\""]; $escaped = json_encode($data); $escaped = json_encode($data, JSON_HEX_APOS | JSON_HEX_QUOT); echo "var value = JSON.parse('{$escaped}');";
You have javascript disabled. You will not be able to edit any code.