Concatenation Operator

hey how to use concatenation operator with

<?php echo CHtml::encode($data->consultants->('first_name'.'last_name'); ?>

I need to display both first name and last name . above code will give error .how do I do that

<?php echo CHtml::encode($data->consultants->first_name . ' ' . $data->consultants->last_name); ?>

Without knowing more about your code I can’t say much more.

great bro.thanx lot

Maybe you will also want to add a new method to a model:

public function getFullName()


    return $this->first_name.' '.$this->last_name;


and then anywhere write: