This is how I create the array
var list = $("#sortable").sortable('toArray');
$.ajax({
type: 'POST',
url: " some path ",
data: { "list" : JSON.stringify(list) },
success: function(data) {}
});
In DB it looks like that
["34","37","38","40","41","42","43","44","45","48","49","50"]
No I want to use this as array in php. How can I convert this string to an array? I tried with unserialize() method but this does not seem the way to go.
unserializeis only for strings serialized with PHP'sserialize, you are actually sending JSON, so,json_decode.