6

Is there something like unserialize PHP functions in jQuery?

I have a variable serialized with PHP serialize(). I have to unserialize it with j Query/java script.

3
  • post your serialized array Commented Apr 30, 2014 at 9:54
  • What type of data are you trying to serialize in php? is it just normal array? Commented Apr 30, 2014 at 9:54
  • Why does it have to be the PHP serialization algorithm? What's wrong with JSON? Commented Apr 30, 2014 at 9:55

2 Answers 2

10

Serialise with json_encode() in PHP, and deserialise with JSON.parse() in Javascript

Sign up to request clarification or add additional context in comments.

Comments

4

http://php.net/manual/en/book.json.php

in PHP

json_encode(unserialize(SerializedVal));

in JavaScript:

JSON.parse(JsonString);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.