I have a PHP script that is serializing an array of strings, each of which contains a single page of a report, using WDDX. The packet is created successfully, but I am not sure what the best method is to send it to the browser, where I want to use javascript to deserialize the packet.
I am using the Smarty template engine and I've been trying to replace a Smarty variable with the contents of the packet, but I've been unsuccessful due to the newlines in the packet.
Is there a clean way of sending a packet to javascript without having to replace all the newlines with something else?
Thanks.