note 80230 added to function.json-encode
| From: | CuriousCarrot at osu1 dot php dot net | Date: | Fri, 04 Jan 2008 22:51:41 +0000 |
| Subject: | note 80230 added to function.json-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134786@lists.php.net to get a copy of this message | ||
What would be nifty (although I kind of see why it isn't already included) would be an optional
parameter to set the style of quotes used. Because,:
<body onload="playWith($somethingThatHasBeenJsonEncoded);">
Won't work when $somethingThatHasBeenJsonEncoded contains double-quotes (which it will). OK,
OK, it's easy to do this:
<body onload='playWith($somethingThatHasBeenJsonEncoded);'>
But still eh?
----
Server IP: 61.195.146.164
Probable Submitter: 86.155.74.79
----
Manual Page -- http://www.php.net/manual/en/function.json-encode.php
Edit -- https://master.php.net/note/edit/80230
Del: integrated -- https://master.php.net/note/delete/80230/integrated
Del: useless -- https://master.php.net/note/delete/80230/useless
Del: bad code -- https://master.php.net/note/delete/80230/bad+code
Del: spam -- https://master.php.net/note/delete/80230/spam
Del: non-english -- https://master.php.net/note/delete/80230/non-english
Del: in docs -- https://master.php.net/note/delete/80230/in+docs
Del: other reasons-- https://master.php.net/note/delete/80230
Reject -- https://master.php.net/note/reject/80230
Search -- https://master.php.net/manage/user-notes.php