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
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
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
3 matches
Mail list logo