note 90407 added to function.json-encode
| From: | SamBarnum at osu1 dot php dot net | Date: | Tue, 21 Apr 2009 06:01:09 +0000 |
| Subject: | note 90407 added to function.json-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153531@lists.php.net to get a copy of this message | ||
Note that if you try to encode an array containing non-utf values, you'll get null values in
the resulting JSON string. You can batch-encode all the elements of an array with the array_map
function:
<?php
$encodedArray = array_map(utf8_encode, $rawArray);
?>
----
Server IP: 209.41.74.194
Probable Submitter: 64.81.247.109
----
Manual Page -- http://www.php.net/manual/en/function.json-encode.php
Edit -- https://master.php.net/note/edit/90407
Del: integrated -- https://master.php.net/note/delete/90407/integrated
Del: useless -- https://master.php.net/note/delete/90407/useless
Del: bad code -- https://master.php.net/note/delete/90407/bad+code
Del: spam -- https://master.php.net/note/delete/90407/spam
Del: non-english -- https://master.php.net/note/delete/90407/non-english
Del: in docs -- https://master.php.net/note/delete/90407/in+docs
Del: other reasons-- https://master.php.net/note/delete/90407
Reject -- https://master.php.net/note/reject/90407
Search -- https://master.php.net/manage/user-notes.php