Show Boolean True

Hi guys, i’m new to yii and frameworks as a general. I’ve made an application in which one of my tables holds a number of boolean attributes.

I want my application to echo the attribute name if the boolean value is true, and not echoing it if it isn’t. The problem is i have no idea on how to do that.

Can you guys please help me?

Ohh btw, I can’t believe i haven’t switched to a framework before. This is great :)

you can do this as, in case of form




if($model->attr){

// code for attribute to echo

}



Thank you, it worked :)