I lumped together this code after reading a few tutorials (quite new to PHP) and keep getting this error:
parse error, unexpected T_STRING, expecting ',' or ';' in play.php on line 9
Any help would be much appreciated.Code:<ul id="nav"> <? echo'<li><a href="play.php?game=The Legend of Zelda"'; if($game=="The Legend of Zelda"){echo' class="current"';} echo'>Legend of Zelda</a> <li><a href="play.php?game=The Adventure of Link"'; if($game=="The Adventure of Link"){echo' class="current"';} echo'>Adventure of Link</a></li> <li><a href="play.php?game=Link's Awakening"'; if($game=="Link's Awakening"){echo' class="current"';} echo'>Link's Awakening</a></li> <li><a href="play.php?game=Ocarina of Time"'; if($game=="Ocarina of Time"){echo' class="current"';} echo'>Ocarina of Time</a></li> <li><a href="play.php?game=Majora's Mask"'; if($game=="Majora's Mask"){echo' class="current"';} echo'>Majora's Mask</a></li> <li><a href="play.php?game=Oracle of Seasons"'; if($game=="Oracle of Seasons"){echo' class="current"';} echo'>Oracle of Seasons</a></li> <li><a href="play.php?game=Oracle of Ages"'; if($game=="Oracle of Ages"){echo' class="current"';} echo'>Oracle of Ages</a></li> <li><a href="play.php?game=The Wind Waker"'; if($game=="The Wind Waker"){echo' class="current"';} echo'>Wind Waker</a></li> <li><a href="play.php?game=The Minish Cap"'; if($game=="The Minish Cap"){echo' class="current"';} echo'>Minish Cap</a></li> <li><a href="play.php?game=Twilight Princess"'; if($game=="Twilight Princess"){echo' class="current"';} echo'>Twilight Princess</a></li>'; ?> </ul>



Reply With Quote






Bookmarks