Jump to content

If Statement Help


Recommended Posts

This code below keeps jumping to the else, what i need is for it to go to the first statement where $click is 0 and on the users next click to go to the else statement...$click is defined.

$click =0;

			 if ($click == 0)									{				echo("<a onclick=\"datefunction('$sday');\" href=\"#sub\">$day</a>\n");				$click = 1;			}		  else {									  echo("<a onclick=\"datefunction2('$sday');\" href=\"#sub\">$day</a>\n");$click = 0;											   }

Any help on why this, i'm betting its an obviously issue to sort :)My problem is it keeps jumping to the else..I'm not sure exactly why

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...