Adding to a numeric variable, how?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a number that I need to display, and itself plus 2:<?php$number=23;$new_number=$number+2;print $number." ".$new_number."\n";?>//23 25//
How can I shorten it to something like this:<?phpprint $number." ".$number+2."\n";?>
Obviously, the above code doesn't do what I want, but I think that itdescribes what I need! Thanks in advance.
Dotan Cohenhttp://song-lirics.com/sl/artist/498/violent-femmes-lirics.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux