title: Yii - CGridView - add own attribute
body: <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array(
      'dataProvider'=&gt;$dataProvider,
      'columns'=&gt;array(
          'title',          // display the 'title' attribute
          'category.name',  // display the 'name' attribute of the 'category' relation
          'content:html',   // display the 'content' attribute as purified HTML
          array(            // display 'create_time' using an expression
              'name'=&gt;'create_time',
              'value'=&gt;'date("M j, Y", $data-&gt;create_time)',
          ),
          array(            // display 'author.username' using an expression
              'name'=&gt;'authorName',
              'value'=&gt;'$data-&gt;author-&gt;username',
  //HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                'htmlOptions'=&gt;array('class'=&gt;'$data-&gt;author-&gt;username', 'secondAttribute' =&gt; $data-&gt;author-&gt;id),
  //HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
          ),
          array(            // display a column with "view", "update" and "delete" buttons
              'class'=&gt;'CButtonColumn',
          ),
      ),
  ));
  </code></pre>
  
  <p>In option <code>value</code> i can add variable from PHP, but for option <code>htmlOptions</code> this is not possible. Why?<br/>How can i make attribute with PHP variable?</p>