Warning: A non-numeric value encountered

后端 未结 18 1859
抹茶落季
抹茶落季 2020-11-22 06:15

Recently updated to PHP 7.1 and start getting following error

Warning: A non-numeric value encountered in on line 29

Here is wha

18条回答
  •  故里飘歌
    2020-11-22 06:19

    Try this.

    $sub_total = 0;
    

    and within your loop now you can use this

    $sub_total += ($item['quantity'] * $product['price']);
    

    It should solve your problem.

提交回复
热议问题