Re: short type codes for use in array conversion
| From: | Ken Tozier | Date: | Fri, 26 Aug 2005 05:34:18 +0000 |
| Subject: | Re: short type codes for use in array conversion | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221402@lists.php.net to get a copy of this message | ||
Thanks for the link Jasper. That solved it.
Ken
On Aug 26, 2005, at 1:22 AM, Jasper Bryant-Greene wrote:
Ken Tozier wrote:I found a method for converting javascript arrays to PHP arrays here: "http://aspn.activestate.com/ASPN/Cookbook/PHP/Recipe/414334" and would like to expand the list of types the function knows about. It looks like 's' = string, 'a' = array but 'i' for integer and 'n' for number don't work. Is there a list of type codes somewhere on the php site? I did a search but apparently didn't hit upon the correct phrase as all searches came up with zero results.The JS code is creating a string in the same way that serialize() does, so that it can be passed through unserialize() to get the actual array. There isn't really a description (that I could find, anyway) in the PHP manual of how serialize() actually stores its values. Take a look at "PHP's Serialization Format", about 1/3 of the way down on this page: http://hurring.com/code/perl/serialize/ Jasper --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php