KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was wondering if there is any way to detect if a number is negative in PHP? I have the following code: $profitloss = $result->date_sold_price - $result->date_bought_price; I need to find out if $profitloss is negative and if it is, I need to echo out that it is.
Tags (comma-separated)
Save Edits
Cancel