我有两个JSON,我想比较它们的价值。我该怎么办?
示例:
volume_id=["1","2","3"];
$json_volumes_id=["2","4","5"];
我的模特:
$this->db->select('*');
$this->db->from('workers_properties');
$this->db->like("volume_id","\"$json_volumes_id\"");
$result_1 = $this->db->get()->result();
答案 0 :(得分:0)
您可以简单地使用json_decode()函数将json转换为数组,然后您可以轻松地比较它们的值。