在使用PHP和MongoDB时,点击编辑按钮时出现以下错误。
错误:
category.php:235 Uncaught SyntaxError: missing ) after argument list
我正在解释下面的代码。
category.php:
<?php
$listdata=$db->kf_category->find();
// print_r(iterator_to_array($listdata));exit;
$counter = 1;
foreach($listdata as $v){
$id=$v['_id'];
$edit=1;
$del=0;
echo "<tr>
<td>".$counter++."</td>
<td>".$v['cat_title']."</td>
<td>
<select class='form-control' id='status1' name='status1' style='height:23px; padding:0px;'>
<option value=''>Select Status</option>
<option value='1' " . ($v['status']=='1'?'selected':'') . ">Enable</option>
<option value='0' " . ($v['status']=='0'?'selected':'') . ">Disable</option>
</select>
</td>
<td>
<img src='uploads/".$v['image']."' name='pro' border='0' style='width:50px; height:50px; border:#808080 1px solid;' />
</td>
<td>
".$v['cat_description']."
</td>
<td>
<button type='button' class='btn btn-xs btn-green outlinedivnone' data-placement='top' title='' data-original-title='Edit' onClick='javascript:changeOfActionMenu($id,$edit);'><i class='fa fa-pencil'></i> </button>
<button type='button' class='btn btn-xs btn-danger outlinedivnone' data-placement='top' title='' data-original-title='Delete' onClick='javascript:changeOfActionMenu($id,$del);'><i class='fa fa-times'></i> </button>
</td>
</tr>";
}
?>
当用户点击编辑图标时,控制台中会出现上述错误。请帮我解决此错误。