这就是我创建数组的方式
var list = $("#sortable").sortable('toArray');
$.ajax({
type: 'POST',
url: " some path ",
data: { "list" : JSON.stringify(list) },
success: function(data) {}
});
在数据库中它看起来像这样
["34","37","38","40","41","42","43","44","45","48","49","50"]
不,我想在 php 中使用它作为数组。如何将此字符串转换为数组?我尝试了unserialize()
方法,但这似乎不是要走的路。