Display Image In Detailed View


i have seen this forum and topic and i want to add image from database in detailed view

 $this->widget('zii.widgets.CDetailView', array(












					'name' => 'gender',

					'value' => $model->gender == 1 ? 'male' : 'female',





but i got different its printed as text

Hi, please try:






no its not working it just displays


You should try to use CHtml::image, it works for me:


            'name' => 'photo',

            'type' => 'raw',

            'value' => CHtml::image($this->createUrl('user/displaySavedImage', array('id' => $model->id)), 'alt'),


thank you so much and one more help how to change height and width sorry im newb to this

Height and width of image?

In this case you should use some php image Processing library to do this, please check out this link http://php.net/manual/en/book.image.php