jbrill Posted July 9, 2007 Share Posted July 9, 2007 so lets say i have $a (a number) and $b(another number) to add them i do this: $c = ($a+$b) then echo $c but what do i do when it comes to multiplying those two variables? Quote Link to comment Share on other sites More sharing options...
Caesar Posted July 9, 2007 Share Posted July 9, 2007 <?php $x = ($a * $b) +2; ?> You mean, like that? Quote Link to comment Share on other sites More sharing options...
jbrill Posted July 9, 2007 Author Share Posted July 9, 2007 what does the +2 do? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 9, 2007 Share Posted July 9, 2007 <?php $x = ($a * $b) +2; ?> You mean, like that? $x = ($a * $b); the question is not clear Quote Link to comment Share on other sites More sharing options...
Caesar Posted July 9, 2007 Share Posted July 9, 2007 what does the +2 do? Just showing you that you can add, multiply...pretty much anything you would do with numbers....just using variables. Quote Link to comment Share on other sites More sharing options...
jbrill Posted July 9, 2007 Author Share Posted July 9, 2007 thanks alot guys Quote Link to comment Share on other sites More sharing options...
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.