Ich bekomme eine Fehlermeldung, da in der ersten Zeile eine Klammer zu viel ist.
Dennoch funktioniert es nicht. Was ist falsch?
PHP-Code:
$i = 0;
$lists = array();
foreach ( $rows as $row )
{
if($row->access <= $aid)
{
$lists[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
} else {
$lists[$i]->link = JRoute::_('index.php?option=com_user&view=login');
}
//$lists[$i]->text = htmlspecialchars( $row->title );
if (strlen($lists[$i]->text) > 15)
{
$lists[$i]->text = htmlspecialchars( substr( $row->title,0,15 ) )."...";
} else {
$lists[$i]->text = htmlspecialchars( $row->title);
}
$i++;
}
Lesezeichen