alin_1817 Posted November 26, 2008 Share Posted November 26, 2008 Fatal error: Unsupported operand types in /mnt/maindisk/var/opt/cvs/ytlhpcps.ytlhotels.com/html/training/ytlhpcps/reports/total_purchase_stock_item.qty.supp.php on line 1096 This the code.. $rpt_filter_by_html_rec .= ""; foreach($description_arr as $key_d=>$val_d){ if ($tmp_total[$key0][$val1][$val_d]['val']['qty']){ $rpt_filter_by_html_rec .= "<br>"; $rpt_filter_by_html_rec .= "<table cellpadding='0' cellspacing='0' border='1' width='100%' class='description_row'>"; //echo "$description_arr<br /> "; foreach($measurement_tbl_title as $key_h=>$val_h){ $rpt_filter_by_html_rec .= "<tr>"; $rpt_filter_by_html_rec .= "<td>$val_h</td>"; //print "<pre>"; print_r($val_h);print "</pre>"; if ($key_h == 'Item'){ $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:left;'>$val_d</td>"; //print "<pre>"; print_r($val_d);print "</pre>"; } elseif ($key_h == 'Measurement'){ foreach($measurement_arr as $key_m=>$val_m){ if ($key_m == $key_d){ $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:center;'>$val_m</td>"; //print "<pre>"; print_r($val_m);print "</pre>"; }}} elseif ($key_h == 'Avg'){ $tmp_amt = $tmp_total[$key0][$val1][$val_d]['val']['amt']; $tmp_qty = $tmp_total[$key0][$val1][$val_d]['val']['qty']; $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format(round($tmp_amt/$tmp_qty,2), 2, ".", ",")."</td>";-----LINE 1096 } else{ $tmp_field = $tmp_total[$key0][$val1][$val_d]['val'][strtolower($key_h)]; $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format($tmp_field, 2, ".", ",")."</td>"; //print "<pre>"; print_r($tmp_field);print "</pre>"; } $rpt_filter_by_html_rec .= "</tr>"; } //close measurement_tbl_title $rpt_filter_by_html_rec .= "</table>"; } // close if tmp_total } //close measurement_arr //}}} } // close description_arr //}} //if(empty ($key_h)) { //$rpt_filter_by_html_rec .= "<td> </td>";} $rpt_filter_by_html_rec .= "</td>"; } // close foreach property_arr }[/s] do help me please............. Link to comment https://forums.phpfreaks.com/topic/134301-fatal-error-unsupported-operand-types/ Share on other sites More sharing options...
alin_1817 Posted November 26, 2008 Author Share Posted November 26, 2008 Fatal error: Unsupported operand types in /mnt/maindisk/var/opt/cvs/ytlhpcps.ytlhotels.com/html/training/ytlhpcps/reports/total_purchase_stock_item.qty.supp.php on line 1096 This the code.. $rpt_filter_by_html_rec .= ""; foreach($description_arr as $key_d=>$val_d){ if ($tmp_total[$key0][$val1][$val_d]['val']['qty']){ $rpt_filter_by_html_rec .= "<br>"; $rpt_filter_by_html_rec .= "<table cellpadding='0' cellspacing='0' border='1' width='100%' class='description_row'>"; //echo "$description_arr<br /> "; foreach($measurement_tbl_title as $key_h=>$val_h){ $rpt_filter_by_html_rec .= "<tr>"; $rpt_filter_by_html_rec .= "<td>$val_h</td>"; //print "<pre>"; print_r($val_h);print "</pre>"; if ($key_h == 'Item'){ $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:left;'>$val_d</td>"; //print "<pre>"; print_r($val_d);print "</pre>"; } elseif ($key_h == 'Measurement'){ foreach($measurement_arr as $key_m=>$val_m){ if ($key_m == $key_d){ $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:center;'>$val_m</td>"; //print "<pre>"; print_r($val_m);print "</pre>"; }}} elseif ($key_h == 'Avg'){ $tmp_amt = $tmp_total[$key0][$val1][$val_d]['val']['amt']; $tmp_qty = $tmp_total[$key0][$val1][$val_d]['val']['qty']; $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format(round($tmp_amt/$tmp_qty,2), 2, ".", ",")."</td>";-----LINE 1096 } else{ $tmp_field = $tmp_total[$key0][$val1][$val_d]['val'][strtolower($key_h)]; $rpt_filter_by_html_rec .= "<td style='width:50px;text-align:right;'>".number_format($tmp_field, 2, ".", ",")."</td>"; //print "<pre>"; print_r($tmp_field);print "</pre>"; } $rpt_filter_by_html_rec .= "</tr>"; } //close measurement_tbl_title $rpt_filter_by_html_rec .= "</table>"; } // close if tmp_total } //close measurement_arr //}}} } // close description_arr //}} //if(empty ($key_h)) { //$rpt_filter_by_html_rec .= "<td> </td>";} $rpt_filter_by_html_rec .= "</td>"; } // close foreach property_arr }[/s] do help me please............. Link to comment https://forums.phpfreaks.com/topic/134301-fatal-error-unsupported-operand-types/#findComment-699195 Share on other sites More sharing options...
.josh Posted November 26, 2008 Share Posted November 26, 2008 that line parses okay for me... Link to comment https://forums.phpfreaks.com/topic/134301-fatal-error-unsupported-operand-types/#findComment-699202 Share on other sites More sharing options...
alin_1817 Posted November 26, 2008 Author Share Posted November 26, 2008 thats why la.. i also dont know which part.... ??? Link to comment https://forums.phpfreaks.com/topic/134301-fatal-error-unsupported-operand-types/#findComment-699374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.