Support » Fixing WordPress » echo problem in php code

  • Resolved nair

    (@nair)


    Hi,

    i have a problem with php code… what is wrong in this part of the echo code:

    } elseif ( (in_category('56') ) {
    echo 	'<div id="menuano">
    	    <ul class="fix">
                    <li><a href="get_settings('home')" title="2007">2007</a></li>
    	    </ul>
             </div>';

    with the code above gives me the error:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in

    thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Incorrect concatenation. Note the changes around get_settings():

    } elseif ( (in_category('56') ) {
    echo 	'<div id="menuano">
    	    <ul class="fix">
                    <li><a href="' . get_settings('home') . '" title="2007">2007</a></li>
    	    </ul>
             </div>';

    it works! thanks for the reply!

    cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘echo problem in php code’ is closed to new replies.