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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.