Jump to content

captcha test


SFB

Recommended Posts

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

sfb, -- makes it go down one, since you did it to $i and not $u it makes $i go down and since you make $u equal to that they both change. just use this:$u--and it will subtract 1 :)

Link to comment
Share on other sites

sfb, -- makes it go down one, since you did it to $i and not $u it makes $i go down and since you make $u equal to that they both change. just use this:$u--and it will subtract 1 :)
I think it got it since he posted a downloadable version...
Link to comment
Share on other sites

well you read it from center point out...it's like X = 5*(2+3)+1*6php can't just read it from left to right... it has to start in the () and do the +, then do the * then the other *, then the + out side the (), and finally get what X is equal to...you need to simplify both sides before crossing them! so $i-- is simplified to 0, then $s is equal to 0.

Link to comment
Share on other sites

i understand that but why can't it I wish it could just change $i for only that one statement. if you had a list of math problems and you were told that x=12 to all of them the value of x would not change after you did the first problem.
but this is the same page, the same problem... if it was a new problem or in php a new page... then it would be the way you want it.
Link to comment
Share on other sites

it's like X = 5*(2+3)+1*6php can't just read it from left to right... it has to start in the () and do the +, then do the * then the other *, then the + out side the (), and finally get what X is equal to...
That's assuming the operators have the same precedence. In that example, parentheses are used to force precedence, so they are evaluated first. Then the expression looks like this:X = 5*5+1*6Multiplication has a higher precedence then addition, so then the expression looks like this:X = 25+6And then the addition, and assigment (equals) has the lowest precedence besides the logical operators. You can see more about that stuff here:http://www.php.net/manual/en/language.oper...tors.precedence
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...