I'm a PHP beginner and I'm currently working on a project where I need to perform mathematical operations using PHP. While experimenting with the code, I came across a confusing situation and I'm unable to figure it out on my own.
Here's my dilemma: I want to create a simple math expression using PHP that evaluates to two different results. So basically, I'm looking for a mathematical expression or formula that, when executed in PHP, gives me two different answers depending on some condition.
For example, let's say I have a variable `$x` and I want to perform some arithmetic operations on it in such a way that if `$x` is even, the result is 10, but if `$x` is odd, the result is 5. I'm wondering how to write the math expression for this scenario.
Any suggestions or insights on how I can achieve this would be greatly appreciated. Thank you in advance for your help!