错误:警告:在PHP代码中遇到非数字值[重复]

This question already has an answer here:

I have a problem in my php code. does anyone know how to fix this? Help me please! Warning: A non-numeric value encountered in C:\xampp\htdocs\stock\dashboard.php on line 15

Code:

$totalRevenue = "";
while ($orderResult = $orderQuery->fetch_assoc()) {
    $totalRevenue += $orderResult['paid'];
}
</div>

you need to initialize $totalRevenue to 0, not an empty string