如何在 CJuiAutoComplete jquery 中包含 PHP 变量?我下面的示例不成功。对不起,我的英语不好。
<?php
echo $count=$t['id'];
$this->widget('zii.widgets.jui.CJuiAutoComplete',
array(
'model'=>$model,
'attribute'=>"jwtn".$t["id"],
'sourceUrl'=>$this->createUrl('KemsainsCalon/lookup'),
'htmlOptions'=>array('placeholder'=>$model->isNewRecord ? "Nama ahli" : "ok"),
'options'=>
array(
'showAnim'=>'fold',
'select'=>"js:function(parsoalan, ui) {
// below is my problem, #KemsainsCalon_jwtn_id<?php echo $count?>, how do I concat php variables in jquery
$('#KemsainsCalon_jwtn_id<?php echo $count?>').val(ui.item.id);
}"
),
'cssFile'=>'jquery-ui.css',
));
?>
`