Ok, first of we need to learn how to set numeric variables, you do this like this: Code: <?php $number1=1 This sets the 1st variable to 1, now we must select a second variable and a variable for the answer. we do this like so: Code: <?php $number1=1 $number2=1 $answer=$number1+$number2 That will set all the variable that we need, now we must make it show it on the web page, we do this with the echo funtion, the final code looks like this: Code: <?php $number1=1 $number2=1 $answer=$number1+$number2 echo $answer ?> I hope you learned some good stuff, and enjoyed the tutorial! Peace Out, Joker
ya i like it but it's just well eh...so easy thats extremly basic php easy you assign a value to each of the variables, make a varible of ading the other 2 varibles then echo (display) the result, im sure any1 could who has done basic match in there life could work it out, no offence to you in anyway =P
Don't you forgot all the ";"-s at the end of each line? Otherwise it's a veeeery simple Tutorial It would be nice if you could explain the difference between assignment and comparison-operators (hope the grammar is correct ) or something else..