I am working on a project which has a lot of JavaScript. I think that generating simple strings and putting them between \"
You might want to check out json_encode and json_decode.