2011-03-14 31 views
1

这是行:解析错误:语法错误,意想不到的“=”(不能找出哪一个)

<a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0')); rel="bookmark"?>" ><?php the_title(); ?></a> 

我检查,我无法看到的问题。

+1

一个很好的方法来解决像这样的东西是分裂每个命令到自己的路线。然而,在这种情况下,它是''rel =“bookmark”'里面的PHP标签 – 2011-03-14 18:33:17

+0

大多数语法高亮的代码编辑器使这类问题很容易解决。 – drudge 2011-03-14 18:36:26

回答

5
<a href="<?php the_permalink(); ?>" 
    title="<?php printf(esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0')); ?>" 
    rel="bookmark"> 
<?php the_title(); ?> 
</a> 
3

我认为它是在rel="bookmark"?>"左右。

相关问题