2 months ago

query inside foreach

Posted 2 months ago by ethar

i try to get all product where id in array

   $cookie_data = stripslashes($_COOKIE["shopping_cart_panorama"]);
   foreach ($cart_data as $key=>$values){
       $products=Products::select('id','img','slug_'.getLange().' as slug','name_'.getLange().' as productName','price')
  return $products;

but its return just first result (id)

Please sign in or create an account to participate in this conversation.