Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.2

Request #12029 Add Json string support
Submitted: 2007-09-12 03:58 UTC
From: electroteque Assigned:
Status: Open Package: HTML_Javascript (version 1.1.1)
PHP Version: 5.2.4 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 + 40 = ?

 
 [2007-09-12 03:58 UTC] electroteque (Daniel Rossi)
Description: ------------ Hi, I was wondering if its possible to include a function into convert to add json string support. I believe json_encode already escapes quotes, it sadly quotes keys, and a firefox bug requires brackets around the array because of this. function convertJsonString($str, $varname, $global = false) { $var = ''; if ($global) { $var = 'var '; } $var .= $varname.' = ('.$str.')'; return $var.';'.HTML_JAVASCRIPT_NL;; } Let me know

Comments