hi all.
I need to divide two elements in my array to reach a percentage. Normally this is easy to do but one of the elements is sometimes zero which generates an error message. I'm not sure how to overcome this in PHP.
In SQL I'd do something like this
CASE WHEN $row[sales] <> 0
THEN $row[gp]/$row[sales]
ELSE '0'
END AS gp percent
How would I do this in PHP?
Thanks
BJ
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --