note 119255 added to json.constants
| From: | Anonymous | Date: | Thu, 28 Apr 2016 00:14:54 +0000 |
| Subject: | note 119255 added to json.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205382@lists.php.net to get a copy of this message | ||
> Please, add a constant JSON_FORCE_ARRAY, for associative array force to just array (without
> keys of array).
you can just use array_values():
<?php
echo json_encode(array_values($array));
?>
----
Server IP: 72.52.91.14
Probable Submitter: 87.138.116.33
----
Manual Page -- http://php.net/manual/en/json.constants.php
Edit -- https://master.php.net/note/edit/119255
Del: integrated -- https://master.php.net/note/delete/119255/integrated
Del: useless -- https://master.php.net/note/delete/119255/useless
Del: bad code -- https://master.php.net/note/delete/119255/bad+code
Del: spam -- https://master.php.net/note/delete/119255/spam
Del: non-english -- https://master.php.net/note/delete/119255/non-english
Del: in docs -- https://master.php.net/note/delete/119255/in+docs
Del: other reasons-- https://master.php.net/note/delete/119255
Reject -- https://master.php.net/note/reject/119255
Search -- https://master.php.net/manage/user-notes.php