mam maly problem z uzyskaniem sumy w ponizszej funkcji. w obrebie funkcji nie moge otrzymac wyniku z funkcji suma czy moze jest inny sposob na otrzymanie tego wyniku?
function tep_draw_radio_menu($name, $values, $default = '', $parameters = '', $required = false) { $field ='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="main">'; $value = tep_output_string($values[$i]['id']); $field .= '<input type="radio" name="' . $name . '" value="' . $value . '"'; if ($i == 0) $field .= ' checked'; $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . ' razem: '; $subject= $name; $patern='#[0-9]+#i'; $wartosc=tep_db_query("select * from products_attributes where products_id='".$matches[0]."' and options_values_id='".$value."'"); while($wartosc_atr=tep_db_fetch_array($wartosc)){ $field.=''.number_format($wartosc_atr['options_values_price'],2).''.$wartosc_atr['price_prefix'].''; } $product_info_query1 = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $matches[0] . "' and pd.products_id = p.products_id and pd.language_id = '4'"); while($product_info1 = tep_db_fetch_array($product_info_query1)){ } $field.= ''. suma($wartosc_atr['options_values_price'],$product_info1['products_price']).''; } $field .= '</td></tr></table>';