note 80334 deleted from function.json-encode by danbrown
| From: | danbrown@php.net | Date: | Sat, 18 Sep 2010 15:44:03 +0000 |
| Subject: | note 80334 deleted from function.json-encode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172713@lists.php.net to get a copy of this message | ||
Note Submitter: Pascal Martineau
----
Hi,
I'm using Ilya Remizov's snippet (look above, ... about Cyrillic encoding) to encode in
utf8 from latin1, which is a very usefull script to encode recursively an array without taking care
of the type of data within the array.
I've found one problem in his script. You should use "$vars = get_object_vars($var);"
instead of "$vars = get_class_vars(get_class($var));" to keep your object vars ok during
the encoding.
bye