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

2009-10-04 Thread Michael A. Peters
Andrea Giammarchi wrote: 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

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

2009-10-04 Thread Andrea Giammarchi
Thank you, worked beautifully. just don't ignore this: PHP 5 = 5.2.0 if you are trying to create something portable, you should consider a Pear fallback ... if(!function_exists('json_encode')){ require_once 'JSON.phps'; // http://mike.teczno.com/JSON/JSON.phps function

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

2009-10-04 Thread Michael A. Peters
Andrea Giammarchi wrote: Thank you, worked beautifully. just don't ignore this: PHP 5 = 5.2.0 if you are trying to create something portable, you should consider a Pear fallback ... I make heavy use of DOMDocument so I need 5.2.x anyway. But thanks for the warning. -- PHP General