Serializing PHP Unserialize Data with jquery

How to repeat below serialized data using jQuery

 a:2:{i:0;s:8:"member 1";i:1;s:8:"member 2";} 
+5
source share
1 answer

If you get a serialized object using PHP, why do you need a serialized php object not serialized only through jQuery.

you can just convert it to json serialize in php

 ob_clean(); echo json_encode(unserialize($serialized_string)); die(); 

In jQuery you can use AJAX dataType if the response is not set as JSON

 var obj= JSON.parse(response_from_server); 
0
source

All Articles