这是我的Cgridview专栏之一
array( 'name'=>'furnished',
'type'=>'raw',
'value'=>'$data->furnished=="FF" ? CHtml::link(CHtml::encode($data->furnished),
"tooltip",["title"=>"**Here I Want to show <?php echo $data->anystring ?>**", "data-toggle"=>"tooltip",
"style"=>"text-decoration: none; cursor:pointer;"]) : $data->furnished',
),
我怎样才能做到这一点。请帮忙
此处显示正常输入的数据。但如何显示PHP变量
提前致谢
答案 0 :(得分:0)
value
中的所有内容都将通过PHP
的{{1}}功能执行。因此,您必须将代码更改为:
eval()
实际上,您不需要'value'=>'$data->furnished=="FF" ? CHtml::link(CHtml::encode($data->furnished),
"tooltip",["title"=>"**Here I Want to show ".$data->anystring."**", "data-toggle"=>"tooltip",
"style"=>"text-decoration: none; cursor:pointer;"]) : $data->furnished'
,而您只需要<?php
。