Jump to content

Display enum filed


Coconut47

Recommended Posts

Hello,

 

I have some trouble to display result from my enum tab

I did this :

if ($level == "a"){

$level = "Level 1";

}else if ($level =="b"){

$level = "Level 2";

}else {

$level = "Level 3";

}

and on my html <?php echo $level; ?>

it display Level 3 on all record...

 

Any idea what I'm doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/235947-display-enum-filed/
Share on other sites

No idea at all as the code looks spot on. If $level is set to "a" then $level will be "Level 1", set to "b" it will be "Level 2" and anything else will be set to "Level 3".

 

This would suggest that $level is not set to a or b?

 

Not much help, but at leat you know this code is good :)

Link to comment
https://forums.phpfreaks.com/topic/235947-display-enum-filed/#findComment-1213022
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.