[PHP] class to generate Javascript Object ??

2009-10-04 Thread Michael A. Peters
I wrote a php class to generate flowplayer/html5 media code for my site: http://www.shastaherps.org/xml_MMmediaClass.phps The buildFlashvars() function in it is really ugly and will be a pain to update as I modify the class in the future. What it does is generate a JavaScript object string,

Re: [PHP] class to generate Javascript Object ??

2009-10-04 Thread Tom Worster
On 10/4/09 9:39 AM, Michael A. Peters mpet...@mac.com wrote: I wrote a php class to generate flowplayer/html5 media code for my site: http://www.shastaherps.org/xml_MMmediaClass.phps The buildFlashvars() function in it is really ugly and will be a pain to update as I modify the class in

RE: [PHP] class to generate Javascript Object ??

2009-10-04 Thread Andrea Giammarchi
I'm thinking (hoping) there is already a php class somewhere for generating JavaScript object strings that I can instead of my ugly easily breakable way of doing it. Anyone know of one? json_encode http://uk3.php.net/manual/en/function.json-encode.php Regards

Re: [PHP] class to generate Javascript Object ??

2009-10-04 Thread Michael A. Peters
Tom Worster wrote: On 10/4/09 9:39 AM, Michael A. Peters mpet...@mac.com wrote: I wrote a php class to generate flowplayer/html5 media code for my site: http://www.shastaherps.org/xml_MMmediaClass.phps The buildFlashvars() function in it is really ugly and will be a pain to update as I