<?
$dog = 5;
$cat = 4;
$mouse = 1;
$dog = 3;
$mouse += $cat-- 2;
echo "Dog: ".$dog." Cat: ".$cat." Mouse: ".$mouse."<BR>";
?>
The problem I am having is understanding the order things get done within the statement:
$mouse += $cat-- * 2;
the operator "--" comes first
the operator "*" comes next
the Operatot "+" comes last
But when going through the statement over on paper it is different when I run the code.
the answer that I get when I run the code:
Dog:15 Cat:4 Mouse: 9
Hope someone can help