I am using this code which calls the period_id :
$cart = $this->GetUserCart();
$dataset = array();
while ($data = $cart->fetch_array()) {
$dataset[] = $data['period_id'];
}
so I need to implode the result so they can be separated by comma
$p = implode(",",$dataset);
So in the usercart function will call for example, 3 distinct period_id
so I need to finish like this :
$p='2,5,3';