faqts : Computers : Programming : Languages : PHP : General Information : PHP5

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 5 people (60%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

PHP wont't do multiplication. Addition works.

Oct 8th, 2006 10:09
Matthew Wilkinson, Arve Fretheim,


Are you sure you are using the correct symbol? * is the symbol for
multiplication in PHP and every other programming language I can think
of. You cannot use x as a multiplicative symbol. eg.
$var1 = 2 * 3;
$var2 = 2 x 3;
$var1 will equal 6, while $var2's declaration will throw up an error.