I've tried the shorthand but it's now working properly on me please help me to solve this problem thank you.
$acc = "free";
echo $limit = $acc == "free" ? 5 : $acc == "muyip" ? 50 : 1000;
My expected result is 5 but the result is 50
I've tried the shorthand but it's now working properly on me please help me to solve this problem thank you.
$acc = "free";
echo $limit = $acc == "free" ? 5 : $acc == "muyip" ? 50 : 1000;
My expected result is 5 but the result is 50
use brackets as below
$acc = "free";
echo $limit = $acc == "free" ? 5 : ($acc == "muyip" ? 50 : 1000);