Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP question: array_filter()


calbasi

Recommended Posts

Hi,

 

I'm trying to personalize my OSC (I want it send an email to each manufacturer with their ordered products). I'm stuck in a php problem:

 

function filtre_editors($var) {
   return ($var["manufacturer_id"] == $listado_editores_dos[$ii]);  //funciona si li poso 29..
}

for ($ii=0; $ii<sizeof($listado_editores_dos); $ii++) {
$order_filtrada = array_filter($order->products, "filtre_editors"); 
sort ($order_filtrada);
}

 

This code doesn't run because $listado_editores_dos[$ii] has a value after the function definition... And I can not add a $ii like:

$order_filtrada = array_filter($order->products, "filtre_editors(,Sii)");  because it's wrong...

My PHP skills are no good and I can't look after the solution... Any ideas?

 

Regards,

 

Joan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...