This warning was implemented in PHP 7.1
You can use explicit conversion instead of expecting an implicit one.
echo intval(str_replace(',', '', $f['MonetarySpend'])) * intval(str_replace(',', '', $f['Customers2']));
If the money can have decimal, you can use floatval instead
echo floatval(str_replace(',', '', $f['MonetarySpend'])) * floatval(str_replace(',', '', $f['Customers2']));
If this bother you and you just want to get ride for one time of warning messages, you can use @ as error control operator :
echo @(str_replace(',', '', $f['MonetarySpend']) * str_replace(',', '', $f['Customers2'])); // no warning
Some examples using php 7.3.5 :
echo "Operations with ints : " . intval(str_replace(',', '', "12,345")) * intval(str_replace(',', '', "42")) . PHP_EOL;
echo "Operations with empty strings : " . intval(str_replace(',', '', "")) * intval(str_replace(',', '', "")) . PHP_EOL;
echo "Operations with floats : " . floatval(str_replace(',', '', "12,345.67")) * floatval(str_replace(',', '', "42")) . PHP_EOL;
echo "Operations with empty strings : " . floatval(str_replace(',', '', "")) * floatval(str_replace(',', '', "")) . PHP_EOL;
echo "Error control : " . @("" * "") . PHP_EOL;
echo "Now, no error control to check if I have warning enabled" . PHP_EOL;
echo "NO error control : " . "" * "" . PHP_EOL;
This outputs :
Operations with ints : 518490
Operations with empty strings : 0
Operations with floats : 518518.14
Operations with empty strings : 0
Error control : 0
Now, no error control to check if I have warning enabled
<br />
<b>Warning</b>: A non-numeric value encountered in <b>[...][...]</b> on line
<b>12</b><br />
<br />
<b>Warning</b>: A non-numeric value encountered in <b>[...][...]</b> on line
<b>12</b><br />
NO error control : 0