shanenin Posted July 28, 2005 Report Share Posted July 28, 2005 I am not sure if other language behave like this, but I thouhgt this was interesting.lets say I make a varibale as a stringmsh>$a = "3"msh>$a + 4msh>34 #it concatenates them, like two stringsbut if I put a number first in the statemnet, it treats them both as integersmsh>$a = "3"msh>4 + $amsh>7 #this time it treated them both as integersso if you want to add a bunch of strings as integers, you do it like thismsh>$a = "3"msh>$b = "5"msh>0 + $a + $bmsh>8 Quote Link to post Share on other sites
jcl Posted July 29, 2005 Report Share Posted July 29, 2005 The first behavior is fairly common, the second less so. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.