初学程序员请帮我找到代码中的错误

时间:2015-03-18 09:26:07

标签: wordpress-plugin

请帮我查一下我的PHP代码中的错误:

if(isset(show_title) && $show_title = 1){
            $the_title = "
                <div class=\"sola_t_title\"><a href=\"".get_the_permalink($post->ID)."\">".get_the_title()."</a></div>"
        } else {
            $the_title =;


        if(isset($show_body)and $show_body == 1){
            $the_body = "
                div class=\"sola_t_body\">&ldquo;".striptags(get_the_excerpt(),"<a><b><em><strong><i><h>")."&rdquo;</div>";
        } else {
            $the_body = "";
        }

1 个答案:

答案 0 :(得分:1)

   if(isset(show_title) && $show_title = 1){
        $the_title = "
            <div class='sola_t_title'><a href='".get_the_permalink($post->ID)."'>".get_the_title()."</a></div>"
    } else {
        $the_title =;


    if(isset($show_body)and $show_body == 1){
        $the_body = "
            div class='sola_t_body'>&ldquo;".striptags(get_the_excerpt(),"<a><b><em><strong><i><h>")."&rdquo;</div>";
    } else {
        $the_body = "";
    }