0

ErrorException in BookinginfoController.php line 101: A non-numeric value encountered

Here's the line of code

$ser_name=trim($ser_name,","); 
$price=trim($price,","); 
$sum+=$fet2[0]->price;

Heres full script

Line 99 is $ser_name=trim($ser_name,","); Line 100 is $price=trim($price,","); Line is 101 $sum+=$fet2[0]->price;

Stephen
  • 11
  • 1
  • 4
  • 1
    Possible duplicate of [Warning: A non-numeric value encountered](https://stackoverflow.com/questions/42044127/warning-a-non-numeric-value-encountered) – Mohammad Oct 29 '18 at 07:12
  • Maybe it should be `$user_name` in the first line? Typo? – Lithilion Oct 29 '18 at 07:13
  • where is `101` ? – Niklesh Raut Oct 29 '18 at 07:15
  • there are three lines of code. are they 101, 102, 103 or maybe 100, 101, 102 or even 99, 100, 101? please update you question. my guess would be that `$price` is not a number.... – JoSSte Oct 29 '18 at 07:20
  • line 98: $ser_name=trim($ser_name,","); – Stephen Oct 30 '18 at 11:54
  • line 99 - $price=trim($price,","); line 100 - $sum+=$fet2[0]->price; – Stephen Oct 30 '18 at 11:55
  • Line 101 is $sum+=$fet2[0]->price; – Stephen Oct 30 '18 at 12:14
  • $fet1 = DB::table('subservices') ->where('subid', '=', $id) ->get(); $ser_name.=$fet1[0]->subname.'
    '; $ser_name.=","; $fet2 = DB::table('seller_services') ->where('subservice_id', '=', $id) ->where('shop_id', '=', $neshopp) ->get(); $price.=$fet2[0]->price.'
    '; $price.=","; $ser_name=trim($ser_name,","); $price=trim($price,","); $sum+=$fet2[0]->price;
    – Stephen Oct 30 '18 at 12:15

0 Answers0