Hello, I have a simple question, in my controller, i want to assign a string value to a variable according to an if else statement.. but the condition is always spitting out the first condition.
if (($imc->imccalculad) < 16.00)
{
$imc->clasificacion = 'Delgadez severa';
}
elseif (($imc->imccalculad >= 16.00) && ($imc->imccalculad <= 16.99))
{
$imc->clasificacion = 'Delgadez moderada';
}
elseif (($imc->imccalculad >= 17.00) && ($imc->imccalculad <= 18.40))
{
$imc->clasificacion = 'Delgadez leve';
}
I'll appreciate if someone can tell me where i am going wrong.. Thanks!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community