This reply has been reported for inappropriate content.
Have you tried casting to int?
It’s possible you’re trying to multiply strings or something. I think, if it’s only that one line causing a problem, when you multiply it in the other equation PHP will automatically cast it as an int because that’s what it thinks you want? Not sure…
Your code worked on my local machine with some sample data… I tried replicating the data as if everything was a string and it worked. But I suggest you type juggle and deal with appropriate data types.