Hi everybody,
I got a small problem:
When I use <?php echo $content;?> I got a strange string like: ""
So it created a space on my website display, I must using margin on CSS.
Now I call a widget to print some string I got the same problem, like the image.
4066
My Widget:
<?php
class CSNews extends CWidget
{
public function init()
{
parent::init();
}
public function run(){
$model = News::model()->findAll(array("limit"=>10, "order"=>"id DESC"));
$this->render('csnews', array('model'=>$model));
}
}
?>
and the view:
<ul class="news" id="news">
<?php foreach ($model as $new) {
echo "<li>";
echo CHtml::link($new->cutTitle(30), array("/home/default/news", "slug"=>$new->slug), array("title"=>$new->title));
echo "</li>";
} ?>
</ul>
Anybody could help me remove the "SPACE"?