a simple question
what is the differences between this:
if($posted_quantity <= $current_quantity) {
if($posted_quantity >= $min_allowed_quantity && $posted_quantity <= $max_allowed_quantity){
//do something
}
}
and this:
if($posted_quantity <= $current_quantity && ($posted_quantity >= $min_allowed_quantity && $posted_quantity <= $max_allowed_quantity)){
//do something
}
if it is possible, what is the differences between those two, which one is better to use, thanks much
EDIT:i am currently doing the testings and i don't seem to find any problem using both approach, and i don't have any elses, i simply want to do something once the whole conditions is fulfilled (to limit the user's quantity), i was just curious on which one is the better approach, which one is faster, readable, things like that