Let's say I have 3 variables
$a;
$b;
$c = 30;
What I wish to do here is that I have to divide $c
and put it in the first 2 variables which can be easily done by doing.
$a = $c / 2;
$b = $c / 2;
However what if in $b
there is a maximum value limit of 10 and $a is limitless.
In this case the values have to be.
$a = 20;
$b = 10;
What would be the best solution for this?