changing <a> value depending on the <?php condition?>
Posted: Sun Jan 15, 2012 11:15 pm
I am just wondering if this is possible because I am using a drop down login form when I click Login Link but when I click Login this will change to Close since Dropdown Login is shown and if closed then Close link will go back to its original value Login.
this is the code I use. and the output is <a>LoginClose</a> instead of <a>Login</a> or <a>Close</a> while opened.
Hope someone helps =)
Code: Select all
<li><a rel="#fe4902" href="#" class="btn-slide">
<? if($log==false)
{
$log=true;
?>Login<?
}elseif($log==true)
{
$log=false;
?>Close<?
}?>
</a></li>
Hope someone helps =)