$product_ids = explode(',', $product_ids); $product_ids = array_filter($product_ids); $final_data = array(); foreach ($product_ids as $key => $product_id) { $sth = $this->db->prepare("SELECt * FROM products Where id =:id "); $sth->execute(array( ':id' => $product_id )); $final_data[$product_id] = $sth->fetchAll(); } echo json_enpre($final_data);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)