Php - 尝试将li添加到当前列表但不获取LI

Trying this: - UPDATE -- SOOORRY!

  <li><a href="index.php" class="first">Home</a></li>
<?php  
        if (the_title() == "language-translation") 
           print("<li><a href='become-a-volunteer'>Become a Volunteer</a></li>");
     ?>
    <li><a href="#"><?php the_title(); ?></a></li>

All I get is the TEXT ('Become a volunteer') and not the LI item...(or the anchor for that matter) ? -- Forgive me but I pasted a mistake.. this is STILL not working above.

I get the TEXT regardless of whether the if is true or not and never get the LI and A

You are closing the PHP tag at the end of the if statement. Remove the end "?>"

if (the_title() == "language-translation") ?>

try

if (the_title() == "language-translation") ?>

Become a Volunteer

reason it doesnt work is because you ended PHP before you enter print (a PHP command)