WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] echo problem in php code (3 posts)

  1. nair
    Member
    Posted 6 years ago #

    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!

  2. Adam Brown
    Member
    Posted 6 years ago #

    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>';
  3. nair
    Member
    Posted 6 years ago #

    it works! thanks for the reply!

    cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags